Lines 48-61
Link Here
|
48 |
#include <errno.h> |
48 |
#include <errno.h> |
49 |
#include <fts.h> |
49 |
#include <fts.h> |
50 |
#include <limits.h> |
50 |
#include <limits.h> |
|
|
51 |
#include <signal.h> |
51 |
#include <stdio.h> |
52 |
#include <stdio.h> |
52 |
#include <stdlib.h> |
53 |
#include <stdlib.h> |
53 |
#include <string.h> |
54 |
#include <string.h> |
54 |
#include <unistd.h> |
55 |
#include <unistd.h> |
55 |
|
56 |
|
|
|
57 |
static volatile sig_atomic_t siginfo; |
58 |
|
56 |
static void usage(void); |
59 |
static void usage(void); |
57 |
static int may_have_nfs4acl(const FTSENT *ent, int hflag); |
60 |
static int may_have_nfs4acl(const FTSENT *ent, int hflag); |
58 |
|
61 |
|
|
|
62 |
static void |
63 |
siginfo_handler(int sig __unused) |
64 |
{ |
65 |
|
66 |
siginfo = 1; |
67 |
} |
68 |
|
59 |
int |
69 |
int |
60 |
main(int argc, char *argv[]) |
70 |
main(int argc, char *argv[]) |
61 |
{ |
71 |
{ |
Lines 125-130
Link Here
|
125 |
if (argc < 2) |
135 |
if (argc < 2) |
126 |
usage(); |
136 |
usage(); |
127 |
|
137 |
|
|
|
138 |
(void)signal(SIGINFO, siginfo_handler); |
139 |
|
128 |
if (Rflag) { |
140 |
if (Rflag) { |
129 |
fts_options = FTS_PHYSICAL; |
141 |
fts_options = FTS_PHYSICAL; |
130 |
if (hflag) |
142 |
if (hflag) |
Lines 192-201
Link Here
|
192 |
rval = 1; |
204 |
rval = 1; |
193 |
} |
205 |
} |
194 |
} else { |
206 |
} else { |
195 |
if (vflag) { |
207 |
if (vflag || siginfo) { |
196 |
(void)printf("%s", p->fts_path); |
208 |
(void)printf("%s", p->fts_path); |
197 |
|
209 |
|
198 |
if (vflag > 1) { |
210 |
if (vflag > 1 || siginfo) { |
199 |
char m1[12], m2[12]; |
211 |
char m1[12], m2[12]; |
200 |
|
212 |
|
201 |
strmode(p->fts_statp->st_mode, m1); |
213 |
strmode(p->fts_statp->st_mode, m1); |
Lines 207-212
Link Here
|
207 |
newmode, m2); |
219 |
newmode, m2); |
208 |
} |
220 |
} |
209 |
(void)printf("\n"); |
221 |
(void)printf("\n"); |
|
|
222 |
|
223 |
siginfo = 0; |
210 |
} |
224 |
} |
211 |
} |
225 |
} |
212 |
} |
226 |
} |