Commit 82adb5ff authored by Mikhail Karpenko's avatar Mikhail Karpenko
Browse files

Add free disk space detection

parent 28233c9b
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -19,11 +19,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/uio.h>
#include <errno.h>
#include <linux/fs.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/uio.h>
#include <sys/stat.h>
#include <string.h>

#include "camogm_ogm.h"
@@ -799,9 +800,6 @@ void camogm_set_prefix(camogm_state *state, const char * p, path_type type)
		} else {
			D0(fprintf(debug_file, "WARNING: raw device write initiated\n"));
			state->rawdev_op = 1;
			/* debug code follows */
			state->rawdev.end_pos =  20971520; // 20Mib size
			/* end of debug code */
		}
	}
}
@@ -997,7 +995,7 @@ void camogm_status(camogm_state *state, char * fn, int xml)
			char *_active = is_chn_active(state, chn) ? "yes" : "no";
			fprintf(f,
			"\t<sensor_port_%d>\n" \
			"\t\t<channel_active>\"%s\"<\channel_active>\n" \
			"\t\t<channel_active>\"%s\"</channel_active>\n" \
			"\t\t<compressor_state>\"%s\"</compressor_state>\n" \
			"\t\t<frame_size>%d</frame_size>\n" \
			"\t\t<frames_skip>%d</frames_skip>\n" \
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#define CAMOGM_FRAME_MALLOC       7        ///< can not allocate memory
#define CAMOGM_TOO_EARLY          8        ///< too early to start, waiting for particular timestamp
#define CAMOGM_FRAME_OTHER        9        ///< other errors
#define CAMOGM_NO_SPACE           10       ///< no free space left on current file system

#define CAMOGM_FORMAT_NONE        0        ///< no video output
#define CAMOGM_FORMAT_OGM         1        ///< output as Ogg Media file
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <fcntl.h>
#include <sys/uio.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>

+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@
#include <fcntl.h>
#include <sys/uio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <asm/byteorder.h>

#include "camogm_kml.h"
+4 −0
Original line number Diff line number Diff line
@@ -43,6 +43,10 @@
#include <fcntl.h>
#include <sys/uio.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>

#include "camogm_mov.h"

Loading