Beautifies cmdline program.

This commit is contained in:
Andrea Mazzoleni 2014-11-12 20:47:07 +01:00
parent 4a91bc1491
commit d9908487ea
7 changed files with 8 additions and 8 deletions

View file

@ -272,7 +272,7 @@ static void import_dir(struct snapraid_state* state, const char* dir)
/* because we use a directory reading method that doesn't read info about ReparsePoint. */
/* Note that here we cannot call here lstat_sync(), because we don't know what kind */
/* of file is it, and lstat_sync() doesn't always work */
if (st.st_mode == 0) {
if (st.st_mode == 0) {
if (lstat(path, &st) != 0) {
/* LCOV_EXCL_START */
fprintf(stderr, "Error in stat file/directory '%s'. %s.\n", path, strerror(errno));

View file

@ -393,7 +393,7 @@ static void windows_attr2stat(DWORD FileAttributes, DWORD ReparseTag, struct win
case IO_REPARSE_TAG_MOUNT_POINT :
st->st_mode = S_IFCHR;
st->st_desc = "reparse-point-mount";
break;
break;
case IO_REPARSE_TAG_NFS :
st->st_mode = S_IFCHR;
st->st_desc = "reparse-point-nfs";

View file

@ -70,7 +70,7 @@ static int clean_dir(struct snapraid_state* state, const char* dir)
/* if the st_mode field is missing, takes care to fill it using normal lstat() */
/* at now this can happen only in Windows */
if (st.st_mode == 0) {
if (st.st_mode == 0) {
if (lstat(path_next, &st) != 0) {
/* LCOV_EXCL_START */
fprintf(stderr, "Error in stat file/directory '%s'. %s.\n", path_next, strerror(errno));

View file

@ -1211,7 +1211,7 @@ static int scan_dir(struct snapraid_scan* scan, int is_diff, const char* dir, co
/* because we use a directory reading method that doesn't read info about ReparsePoint. */
/* Note that here we cannot call here lstat_sync(), because we don't know what kind */
/* of file is it, and lstat_sync() doesn't always work */
if (st->st_mode == 0) {
if (st->st_mode == 0) {
if (lstat(path_next, st) != 0) {
/* LCOV_EXCL_START */
fprintf(stderr, "Error in stat file/directory '%s'. %s.\n", path_next, strerror(errno));
@ -1523,7 +1523,7 @@ void state_scan(struct snapraid_state* state, int is_diff)
/* if the file is not empty, count duplicate physical offsets */
if (state->opt.force_order == SORT_PHYSICAL && file->size != 0) {
if (phy_file_last != 0 && file->physical == phy_last
/* files without offset are expected to have duplicates */
/* files without offset are expected to have duplicates */
&& phy_last != FILEPHY_WITHOUT_OFFSET
) {
/* if verbose, prints the list of duplicates real offsets */

View file

@ -198,7 +198,7 @@ static void search_dir(struct snapraid_state* state, const char* dir)
/* because we use a directory reading method that doesn't read info about ReparsePoint. */
/* Note that here we cannot call here lstat_sync(), because we don't know what kind */
/* of file is it, and lstat_sync() doesn't always work */
if (st.st_mode == 0) {
if (st.st_mode == 0) {
if (lstat(path, &st) != 0) {
/* LCOV_EXCL_START */
fprintf(stderr, "Error in stat file/directory '%s'. %s.\n", path, strerror(errno));

View file

@ -4702,7 +4702,7 @@ int state_progress(struct snapraid_state* state, block_off_t blockpos, block_off
/* if we have at least 5 measures */
if (state->progress_tick >= 5
/* or if we are running in test mode, with at least one measure */
/* or if we are running in test mode, with at least one measure */
|| (state->opt.force_progress && state->progress_tick >= 1)
) {
int oldest;

View file

@ -950,7 +950,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
if ((state->autosave != 0
&& autosavedone >= autosavelimit /* if we have reached the limit */
&& autosavemissing >= autosavelimit) /* if we have at least a full step to do */
/* or if we have a forced autosave at the specified block */
/* or if we have a forced autosave at the specified block */
|| (state->opt.force_autosave_at != 0 && state->opt.force_autosave_at == i)
) {
autosavedone = 0; /* restart the counter */