/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/usplash.c

  • Committer: Teddy Hogeborn
  • Date: 2009-01-06 22:43:19 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090106224319-zpussai0zoy77ho3
Merge release from release branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  -*- coding: utf-8 -*- */
2
2
/*
3
 
 * Usplash - Read a password from usplash and output it
 
3
 * Passprompt - Read a password from usplash and output it
4
4
 * 
5
5
 * Copyright © 2008,2009 Teddy Hogeborn
6
6
 * Copyright © 2008,2009 Björn Påhlsson
92
92
  }
93
93
  
94
94
  size_t written = 0;
95
 
  ssize_t sret = 0;
96
95
  while(not interrupted_by_signal and written < cmd_line_len){
97
 
    sret = write(fifo_fd, cmd_line + written,
98
 
                 cmd_line_len - written);
99
 
    if(sret == -1){
 
96
    ret = write(fifo_fd, cmd_line + written,
 
97
                cmd_line_len - written);
 
98
    if(ret == -1){
100
99
      if(errno != EINTR or interrupted_by_signal){
101
100
        int e = errno;
102
101
        close(fifo_fd);
107
106
        continue;
108
107
      }
109
108
    }
110
 
    written += (size_t)sret;
 
109
    written += (size_t)ret;
111
110
  }
112
111
  free(cmd_line_alloc);
113
112
  do{