~ubuntu-branches/ubuntu/lucid/g15daemon/lucid

« back to all changes in this revision

Viewing changes to g15daemon/utility_funcs.c

  • Committer: Bazaar Package Importer
  • Author(s): Giacomo Catenazzi
  • Date: 2009-12-18 07:52:26 UTC
  • mfrom: (7.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20091218075226-dmrk10zv02cefyc3
Tags: 1.9.5.3-8
* Put the third argument (modes) on open with O_CREAT (Closes: #559649)
* remove rpath

Show diffs side-by-side

added added

removed removed

Lines of Context:
674
674
    memcpy(canvas->buffer,buffer,LCD_BUFSIZE);
675
675
    fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
676
676
    if(fd == -1) {
677
 
        g15daemon_log(LOG_WARNING, "uf_screendump_pbm failed: open, %s.\n", strerror(errno));
678
 
        return -1;
 
677
       g15daemon_log(LOG_WARNING, "uf_screendump_pbm failed: open, %s.\n", strerror(errno));
 
678
       return -1;
679
679
    }
680
680
    f = fdopen(fd,"w");
681
681
    if(f==NULL) {
682
 
        close(fd);
 
682
       close(fd);
683
683
        g15daemon_log(LOG_WARNING, "uf_screendump_pbm failed: fdopen, %s.\n", strerror(errno));
684
684
        return -1;
685
685
    }
 
686
 
686
687
    fprintf(f,"P1\n160 43\n");
687
688
    fprintf(f,"# G15 screendump - %s\n\n",filename);
688
689
    for(y=0;y<43;y++)