Changeset 31658


Ignore:
Timestamp:
12/09/14 22:02:15 (8 years ago)
Author:
obi
Message:

add getmoviedev

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r31136 r31658  
    66976697}
    66986698
     6699char* getmoviedev()
     6700{
     6701        char* tmpstr = NULL;
     6702        char* buf = NULL;
     6703        tmpstr = readfiletomem("/tmp/.moviedev", 1);
     6704        printf("tmpstr: %s\n", tmpstr);
     6705
     6706        buf = oregex("sd([a-z]{1,1}).*", tmpstr);
     6707        printf("buf: %s\n", buf);
     6708
     6709        free(tmpstr), tmpstr = NULL;
     6710
     6711        return buf;
     6712}
     6713
     6714void hddwakeup(char* dev)
     6715{
     6716        char* cmd = NULL;
     6717        cmd = ostrcat("sdparm -C START ", dev, 0, 0);
     6718        printf("cmd: %s\n", cmd);
     6719        system(cmd);
     6720        free(cmd), cmd = NULL; 
     6721}
     6722
    66996723#endif
  • titan/titan/rectimer.h

    r31654 r31658  
    544544printf("########################################\n");
    545545
    546 
     546                                char* moviedev = getmoviedev();
     547                                if(moviedev != NULL)
     548                                        hddwakeup(moviedev);
     549                                free(moviedev), moviedev = NULL;
     550                                 
    547551                                //workaround for standby recording
    548552                                char* cmd = NULL;
     
    553557                                free(cmd), cmd = NULL;
    554558printf("########################################\n");
    555 
     559/*
    556560                                sleep(5);
    557561                                cmd = NULL;
     
    604608system("ls -al /media/autofs/sda1/");
    605609printf("########################################\n");
    606 
     610*/
    607611                                // workaround end       
    608612                                ret = recordstart(chnode, -1, 0, RECTIMER, node->end, node);
Note: See TracChangeset for help on using the changeset viewer.