/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/plymouth.c

  • Committer: Teddy Hogeborn
  • Date: 2010-09-26 18:32:58 UTC
  • Revision ID: teddy@fukt.bsnet.se-20100926183258-n31ux2r8d06m1hi1
Update copyright year to "2010" wherever appropriate.

* DBUS-API: Added copyright and license statement.
* README: Mention new "plymouth" plugin.
* debian/control: Depend on python-2.6 or python-multiprocessing.
* debian/mandos-client.README.Debian: Update info about DEVICE setting
                                      of initramfs.conf.
* mandos-ctl: Added copyright and license statement.
* mandos-monitor: - '' -
* plugins.d/plymouth.c: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
      return 0;
197
197
    }
198
198
  }
199
 
  char exe_target[sizeof(plymouthd_path)];
 
199
  char exe_target[sizeof(plymouth_path)];
200
200
  char *exe_link;
201
201
  ret = asprintf(&exe_link, "/proc/%s/exe", proc_entry->d_name);
202
202
  if(ret == -1){
223
223
  
224
224
  ssize_t sret = readlink(exe_link, exe_target, sizeof(exe_target));
225
225
  free(exe_link);
226
 
  if((sret != (ssize_t)sizeof(plymouthd_path)-1) or
227
 
      (memcmp(plymouthd_path, exe_target,
228
 
              sizeof(plymouthd_path)-1) != 0)){
 
226
  if((sret != (ssize_t)sizeof(plymouth_path)-1) or
 
227
      (memcmp(plymouth_path, exe_target,
 
228
              sizeof(plymouth_path)-1) != 0)){
229
229
    return 0;
230
230
  }
231
231
  return 1;
245
245
  if(maxvalue == 0){
246
246
    struct dirent **direntries;
247
247
    ret = scandir("/proc", &direntries, is_plymouth, alphasort);
248
 
    if (ret == -1){
249
 
      error(0, errno, "scandir");
250
 
    }
251
 
    if (ret > 0){
252
 
      ret = sscanf(direntries[0]->d_name, "%" SCNuMAX, &maxvalue);
253
 
      if (ret < 0){
254
 
        error(0, errno, "sscanf");
255
 
      }
256
 
    }
 
248
    sscanf(direntries[0]->d_name, "%" SCNuMAX, &maxvalue);
257
249
  }
258
250
  pid_t pid;
259
251
  pid = (pid_t)maxvalue;