Print a better diagnostic message for cross-device link errors, which
happens when a clone volume is not in the same partition as the
parent read-write volume.
Reviewed-on: http://gerrit.openafs.org/10850
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit
da1597d74a0f56e35a156ec27df231f965934910)
Change-Id: I30cb0e87612732bfbce2c001831324d1a9e54409
Reviewed-on: http://gerrit.openafs.org/11587
Reviewed-by: Daria Phoebe Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
int
PrintDiagnostics(char *astring, afs_int32 acode)
{
- if (acode == EACCES) {
+ switch (acode) {
+ case EACCES:
fprintf(STDERR,
"You are not authorized to perform the 'vos %s' command (%d)\n",
astring, acode);
- } else {
+ break;
+ case EXDEV:
+ fprintf(STDERR, "Error in vos %s command.\n", astring);
+ fprintf(STDERR, "Clone volume is not in the same partition as the read-write volume.\n");
+ break;
+ default:
fprintf(STDERR, "Error in vos %s command.\n", astring);
PrintError("", acode);
+ break;
}
return 0;
}