From 8b6ea7213a69f19ce2e591f1ae56a1db946c136c Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Wed, 10 Dec 2014 14:36:36 -0500 Subject: [PATCH] Add AFSCONF_NOCELLNAME error code Contrast with AFSCONF_NOCELL, which is for when no cell configuration information is available at all (i.e., a struct afsconf_dir* was NULL) -- this code is used when there is some cell configuration available, but that configuration does not include the cell name. Replace the only existing use of AFSCONF_UNKNOWN with this more-informative error code, leaving AFSCONF_UNKNOWN free for use in other situations. Change-Id: I989756a960e5377545af43f8e9414d1f2d6476b4 Reviewed-on: http://gerrit.openafs.org/11628 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- src/auth/acfg_errors.et | 1 + src/auth/cellconfig.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/auth/acfg_errors.et b/src/auth/acfg_errors.et index a9e595095..39f93bce6 100644 --- a/src/auth/acfg_errors.et +++ b/src/auth/acfg_errors.et @@ -20,4 +20,5 @@ error_table ACFG ec AFSCONF_NOCELLDB, "unable to open cell database" ec AFSCONF_NO_SECURITY_CLASS, "unable to build security class" ec AFSCONF_BADKEY, "key doesn't meet requirements" + ec AFSCONF_NOCELLNAME, "cannot determine local cell name" end diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index 2b99c0bc6..cd65f6782 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -1476,7 +1476,7 @@ afsconf_GetCellInfo(struct afsconf_dir *adir, char *acellName, char *aservice, * * @return status * @retval 0 success - * @retval AFSCONF_UNKNOWN failed to get cellname + * @retval AFSCONF_NOCELLNAME cannot determine local cell name * * @internal */ @@ -1509,7 +1509,7 @@ _afsconf_GetLocalCell(struct afsconf_dir *adir, char **pname, int check) if (adir->cellName) { *pname = adir->cellName; } else - code = AFSCONF_UNKNOWN; + code = AFSCONF_NOCELLNAME; } return code; } -- 2.39.5