Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: System freeze - scanning recordings ...



Am Montag, 22. September 2003 22:05 schrieben Sie:

#include "stdlib.h"
#include <stdio.h>
#include <iostream.h>


#define FINDCMD      "/usr/bin/find %s -follow -type d -name '%s' 2> 
/dev/null;echo"
#define MAXPARSEBUFFER 1000

char *readline(FILE *f)
{
  static char buffer[MAXPARSEBUFFER];
  if (fgets(buffer, sizeof(buffer), f) > 0) {
     int l = strlen(buffer) - 1;
     if (l >= 0 && buffer[l] == '\n')
        buffer[l] = 0;
     return buffer;
     }
  return NULL;
}


int main(){

        char *cmd = NULL;
        asprintf(&cmd, FINDCMD, "/video", "*.rec");
        FILE *p = popen(cmd, "r");

        char *s;
        while ((s = readline(p)) != NULL) {
           cout<<s<<"\n";
        }
        pclose(p);


//      system(cmd);
        return 0;
}


works fine for me now: 

coruscant root # ./a.out
/video/Doku:_Spurensuche_im_All/2003-09-18.11:29.50.50.rec

This makes things even worse. Why doesn't it work in the VDR environment?
--
Thorsten



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index