OSDN Git Service

fix tunerec
[rec10/rec10-git.git] / tunerec / tunerec.c
index 9bcf0ea..7571c6e 100755 (executable)
@@ -29,7 +29,7 @@ static int search(int adapter_nr,struct channel *ch)
        fe_status_t status;
 
        sprintf(file, "/dev/dvb/adapter%d/frontend0", adapter_nr);
-       if ((fd = open(file, O_RDWR)) < 0) {
+       if ((fd = open(file, (O_RDWR | O_CREAT | O_TRUNC), 0666)) < 0) {
                perror("open");
                return -1;
        }
@@ -184,7 +184,7 @@ int main(int argc, char *argv[]) {
                return 1;
 
        ret = track(adapter_nr);
-       record(adapter_nr, argv[3], rectime);
+       record(adapter_nr, argv[5], rectime);
        close(fd);
 
        return ret < 0;