Skip to content

Commit

Permalink
Added error-checking for lfs setstripe call
Browse files Browse the repository at this point in the history
  • Loading branch information
frankwillmore committed Oct 25, 2022
1 parent 8268eaf commit 25955ec
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/seism-core-slice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,16 @@ int main(int argc, char** argv)
if (lfs_stripe_count) sprintf(lfs_count_str, "-c %d ", lfs_stripe_count);
char lfs_command[256];
cout << "Setting striping info:" << endl;
sprintf(lfs_command, "lfs setstripe %s %s %s > /dev/null ", lfs_size_str, lfs_count_str, filename);
// sprintf(lfs_command, "lfs setstripe %s %s %s > /dev/null ", lfs_size_str, lfs_count_str, filename);
sprintf(lfs_command, "lfs setstripe %s %s %s ", lfs_size_str, lfs_count_str, filename);
cout << lfs_command << endl << endl;
assert(system(lfs_command) == 0) ; // run striping command on shell.
// assert(system(lfs_command) == 0) ; // run striping command on shell.
int retval = system(lfs_command); // run striping command on shell.
if (retval != 0)
{
printf(">>>%s<<<\nCommand failed.\n", lfs_command);
exit(retval);
}
}
}
}
Expand Down

0 comments on commit 25955ec

Please sign in to comment.