145 |
fprintf(stdout, |
fprintf(stdout, |
146 |
"Device '%s' is not accessible\n\t" |
"Device '%s' is not accessible\n\t" |
147 |
"Space: - Inodes: -\n\t" |
"Space: - Inodes: -\n\t" |
148 |
"Permission: -\n", |
"UID: - GID: - Permission: -\n", |
149 |
s->name); |
s->name); |
150 |
} else { |
} else { |
151 |
|
|
154 |
fprintf(stdout, |
fprintf(stdout, |
155 |
"Device '%s' is accessible\n\t" |
"Device '%s' is accessible\n\t" |
156 |
"Space: %.1f%% [%.1f MB] Inodes: %.1f%% [%ld objects]\n\t" |
"Space: %.1f%% [%.1f MB] Inodes: %.1f%% [%ld objects]\n\t" |
157 |
"Permission: %o\n", |
"UID: %d GID: %d Permission: %o\n", |
158 |
s->name, |
s->name, |
159 |
(float) 100 * (s->devinfo->f_blocks - |
(float) 100 * (s->devinfo->f_blocks - |
160 |
s->devinfo->f_blocksfree) / |
s->devinfo->f_blocksfree) / |
164 |
(float) 100 * (s->devinfo->f_files - s->devinfo->f_filesfree) / |
(float) 100 * (s->devinfo->f_files - s->devinfo->f_filesfree) / |
165 |
s->devinfo->f_files, |
s->devinfo->f_files, |
166 |
s->devinfo->f_files - s->devinfo->f_filesfree, |
s->devinfo->f_files - s->devinfo->f_filesfree, |
167 |
|
(int)stat_buf.st_uid, (int)stat_buf.st_gid, |
168 |
(int)(stat_buf.st_mode & 07777)); |
(int)(stat_buf.st_mode & 07777)); |
169 |
|
|
170 |
} else { |
} else { |
171 |
|
|
172 |
fprintf(stdout, "Device '%s' is accessible\n\t" |
fprintf(stdout, "Device '%s' is accessible\n\t" |
173 |
"Space: %.1f%% [%.1f MB]\n\t" |
"Space: %.1f%% [%.1f MB]\n\t" |
174 |
"Permission: %o\n", |
"UID: %d GID: %d Permission: %o\n", |
175 |
s->name, |
s->name, |
176 |
(float) 100 * (s->devinfo->f_blocks - |
(float) 100 * (s->devinfo->f_blocks - |
177 |
s->devinfo->f_blocksfree) / s->devinfo->f_blocks, |
s->devinfo->f_blocksfree) / s->devinfo->f_blocks, |
178 |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfree) / |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfree) / |
179 |
1048576 * s->devinfo->f_bsize, |
1048576 * s->devinfo->f_bsize, |
180 |
|
(int)stat_buf.st_uid, (int)stat_buf.st_gid, |
181 |
(int)(stat_buf.st_mode & 07777)); |
(int)(stat_buf.st_mode & 07777)); |
182 |
} |
} |
183 |
|
|