2002-11-08 Theodore Ts'o <tytso@mit.edu>
+ * fs_ext2.c (fs_expand, fs_shrink),
+ fsimext2.c (fsim_mkfs, fsim_fsck): Inform the user if e2fsck,
+ mke2fs or resize2fs dies with a signal, or if the exit
+ with a non-zero exit status.
+
* fsimext2.c (set_mkfs_options): If the hard sector size is 1024,
don't force a blocksize of 1024; there's no need to do so.
}
if ( WIFEXITED(status) ) {
/* get expand exit code */
- LOG("Expand completed with rc = %d \n",status);
rc = WEXITSTATUS(status);
+ if (rc)
+ LOG("Expand completed successfully\n");
+ else
+ LOG("Expand completed with rc = %d\n", status);
} else {
+ if (WIFSIGNALED(status))
+ LOG("Expand died with signal %d",
+ WTERMSIG(status));
rc = EINTR;
}
}
}
if ( WIFEXITED(status) ) {
/* get shrink exit code */
- LOG("Shrink completed with rc = %d \n",status);
rc = WEXITSTATUS(status);
+ if (rc)
+ LOG("Shrink completed successfully\n");
+ else
+ LOG("Shrink completed with rc = %d\n",status);
} else {
+ if (WIFSIGNALED(status))
+ LOG("Shrink died with signal %d",
+ WTERMSIG(status));
rc = EINTR;
}
}
if ( WIFEXITED(status) ) {
/* get mke2fs exit code */
rc = WEXITSTATUS(status);
+ if (rc)
+ LOG("mke2fs exited with status %d", rc);
} else {
+ if (WIFSIGNALED(status))
+ LOG("mke2fs died with signal %d",
+ WTERMSIG(status));
rc = EINTR;
}
}
if ( WIFEXITED(status) ) {
/* get e2fsck exit code */
*ret_status = WEXITSTATUS(status);
- LOG("e2fsck completed with exit code %d \n",
+ LOG("e2fsck completed with exit code %d\n",
*ret_status);
rc = 0;
} else {
+ if (WIFSIGNALED(status))
+ LOG("e2fsck died with signal %d",
+ WTERMSIG(status));
rc = EINTR;
}
}