From: Michael Meffie Date: Tue, 18 Feb 2014 20:23:54 +0000 (-0500) Subject: vos: cross-device link error message X-Git-Tag: upstream/1.6.17^2~57 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=20093d0b69a02bd3fd243698472422e9239b21f1;p=packages%2Fo%2Fopenafs.git vos: cross-device link error message 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 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit da1597d74a0f56e35a156ec27df231f965934910) Change-Id: I30cb0e87612732bfbce2c001831324d1a9e54409 Reviewed-on: http://gerrit.openafs.org/11587 Reviewed-by: Daria Phoebe Brashear Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand --- diff --git a/src/volser/vos.c b/src/volser/vos.c index 77007e968..bb9d1eace 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -5852,13 +5852,20 @@ EndTrans(struct cmd_syndesc *as, void *arock) 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; }