disk-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
b2d28533dd
commit
45ca68ece7
|
@ -15,6 +15,7 @@
|
|||
#include "nls.h"
|
||||
#include "blkdev.h"
|
||||
#include "pathnames.h"
|
||||
#include "closestream.h"
|
||||
|
||||
struct bdc {
|
||||
long ioc; /* ioctl code */
|
||||
|
@ -221,6 +222,7 @@ int main(int argc, char **argv)
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
if (argc < 2)
|
||||
usage(stderr);
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include <sys/utsname.h>
|
||||
#include "nls.h"
|
||||
#include "blkdev.h"
|
||||
#include "closestream.h"
|
||||
#include "linux_version.h"
|
||||
|
||||
/* this has to match with the kernel structure */
|
||||
|
@ -79,6 +80,7 @@ main(int argc, char * argv[]) {
|
|||
setlocale(LC_MESSAGES, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
for (;;) {
|
||||
int opt;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
#include "nls.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
|
@ -119,6 +120,7 @@ int main(int argc, char **argv)
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
while ((ch = getopt_long(argc, argv, "nVh", longopts, NULL)) != -1)
|
||||
switch (ch) {
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include "pathnames.h"
|
||||
#include "exitcodes.h"
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
|
||||
#define XALLOC_EXIT_CODE FSCK_EX_ERROR
|
||||
#include "xalloc.h"
|
||||
|
@ -1479,6 +1480,7 @@ int main(int argc, char *argv[])
|
|||
setlocale(LC_CTYPE, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
mnt_init_debug(0); /* init libmount debug mask */
|
||||
mntcache = mnt_new_cache(); /* no fatal error if failed */
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include "blkdev.h"
|
||||
#include "c.h"
|
||||
#include "exitcodes.h"
|
||||
#include "closestream.h"
|
||||
|
||||
#define XALLOC_EXIT_CODE FSCK_EX_ERROR
|
||||
#include "xalloc.h"
|
||||
|
@ -644,6 +645,7 @@ int main(int argc, char **argv)
|
|||
setlocale(LC_MESSAGES, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
page_size = getpagesize();
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
#include "bitops.h"
|
||||
#include "ismounted.h"
|
||||
#include "writeall.h"
|
||||
#include "closestream.h"
|
||||
|
||||
#define ROOT_INO 1
|
||||
#define YESNO_LENGTH 64
|
||||
|
@ -1242,6 +1243,7 @@ main(int argc, char **argv) {
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
if (argc == 2 &&
|
||||
(!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "nls.h"
|
||||
#include "c.h"
|
||||
#include "strutils.h"
|
||||
#include "closestream.h"
|
||||
|
||||
#define ISODCL(from, to) (to - from + 1)
|
||||
|
||||
|
@ -181,6 +182,7 @@ int main(int argc, char **argv)
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
while ((opt = getopt_long(argc, argv, "d:xVh", longopts, NULL)) != -1)
|
||||
switch (opt) {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "blkdev.h"
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
#include "nls.h"
|
||||
#include "strutils.h"
|
||||
#include "xalloc.h"
|
||||
|
@ -118,6 +119,7 @@ int main(int argc, char **argv)
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
if (argc < 2)
|
||||
usage(stderr);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
#include "nls.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
|
@ -80,6 +81,7 @@ int main(int argc, char **argv)
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
if (argc == 2 && !strcmp(argv[1], "-V"))
|
||||
print_version();
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "c.h"
|
||||
#include "cramfs.h"
|
||||
#include "closestream.h"
|
||||
#include "md5.h"
|
||||
#include "nls.h"
|
||||
#include "exitcodes.h"
|
||||
|
@ -718,6 +719,7 @@ int main(int argc, char **argv)
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
/* command line options */
|
||||
while ((c = getopt(argc, argv, "hb:Ee:i:n:N:psVvz")) != EOF) {
|
||||
|
|
|
@ -85,6 +85,7 @@
|
|||
#include "exitcodes.h"
|
||||
#include "strutils.h"
|
||||
#include "writeall.h"
|
||||
#include "closestream.h"
|
||||
|
||||
#define MINIX_ROOT_INO 1
|
||||
#define MINIX_BAD_INO 2
|
||||
|
@ -660,6 +661,7 @@ int main(int argc, char ** argv) {
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
if (argc == 2 &&
|
||||
(!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) {
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
#include "writeall.h"
|
||||
#include "xalloc.h"
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
|
||||
#ifdef HAVE_LIBUUID
|
||||
# include <uuid.h>
|
||||
|
@ -496,6 +497,7 @@ main(int argc, char **argv) {
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
while((c = getopt_long(argc, argv, "cfp:L:v:U:Vh", longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
#include "nls.h"
|
||||
#include "pathnames.h"
|
||||
|
||||
|
@ -106,6 +107,7 @@ int main(int argc, char *argv[])
|
|||
setlocale(LC_MESSAGES, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
while ((c = getopt_long(argc, argv, "qaVh", longopts, NULL)) != -1)
|
||||
switch (c) {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#endif
|
||||
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
#include "writeall.h"
|
||||
#include "swapheader.h"
|
||||
#include "strutils.h"
|
||||
|
@ -183,6 +184,7 @@ int main(int argc, char *argv[])
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
while ((c = getopt_long(argc, argv, "hVL:U:", longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
|
|
Loading…
Reference in New Issue