~ubuntu-branches/debian/sid/ecryptfs-utils/sid

« back to all changes in this revision

Viewing changes to tests/kernel/inode-race-stat/test.c

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS), Dustin Kirkland and Martin Pitt, Fernando Seiti Furusato
  • Date: 2015-06-15 15:50:05 UTC
  • mfrom: (1.5.12)
  • Revision ID: package-import@ubuntu.com-20150615155005-vxvg3ezl7ibfdoes
Tags: 106-1
* New upstream release.
* Transition from libecryptfs0 to libecryptfs1 .
* Remove unused libgcrypt11-dev build dependency (closes: #764927).
* Remove bashism from the postinst of ecryptfs-utils .
* Add watch file.
* Put myself as the primary maintainer.
* Update Standards-Version to 3.9.6 .

[ Dustin Kirkland and Martin Pitt ]
* debian/ecryptfs-utils.postinst: LP: #953875
  - detect and clean up after nonexisting cryptswap devices

[ Fernando Seiti Furusato <ferseiti@br.ibm.com> ]
* Use autoreconf instead of autotools-dev (closes: #751989).

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include <stdlib.h>
35
35
#include <stdbool.h>
36
36
#include <string.h>
 
37
#include <stdint.h>
37
38
 
38
39
#include <unistd.h>
39
40
#include <fcntl.h>
106
107
{
107
108
        for (;;) {
108
109
                int n;
109
 
                int ret;
110
110
                char cmd[32];
111
111
 
112
112
                if ((n = read(fdin, cmd, sizeof(cmd))) < 1) {
122
122
                if (cmd[0] == CMD_TEST) {
123
123
                        int ret;
124
124
                        off_t sz;
125
 
                        sscanf(cmd+1, "%zd", &sz);
 
125
                        sscanf(cmd+1, "%jd", (intmax_t *)&sz);
126
126
 
127
127
                        ret = check_size(filename, sz);
128
128
                        switch (ret) {
307
307
                }
308
308
 
309
309
                /* Now tell children to stat the file */
310
 
                snprintf(cmd, sizeof(cmd), "%c%zd", CMD_TEST, sz);
 
310
                snprintf(cmd, sizeof(cmd), "%c%jd", CMD_TEST, (intmax_t)sz);
311
311
                for (i = 0; i < threads; i++) {
312
312
                        if (write(pipe_to[i][1], cmd, strlen(cmd)+1) < 0) {
313
313
                                fprintf(stderr, "write to pipe failed: %s\n",
361
361
        cmd[0] = CMD_QUIT;
362
362
        for (i = 0; i < threads; i++) {
363
363
                int status;
364
 
                int ret;
365
364
 
366
 
                ret = write(pipe_to[i][1], cmd, 1);
 
365
                if (write(pipe_to[i][1], cmd, 1) != 1)
 
366
                        continue;
367
367
                (void)waitpid(pids[i], &status, 0);
368
368
 
369
369
                (void)close(pipe_to[i][1]);