OSSP CVS Repository

ossp - Check-in [3489]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3489
Date: 2003-Jul-02 17:31:38 (local)
2003-Jul-02 15:31:38 (UTC)
User:ms
Branch:
Comment: Add temporary directory option error logic.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc.h      1.56 -> 1.57     9 inserted, 8 deleted
ossp-pkg/rc/rc_const.h      1.31 -> 1.32     2 inserted, 1 deleted
ossp-pkg/rc/rc_list.c      1.2 -> 1.3     3 inserted, 3 deleted
ossp-pkg/rc/rc_util.c      1.11 -> 1.12     2 inserted, 1 deleted

ossp-pkg/rc/rc.h 1.56 -> 1.57

--- rc.h 2003/07/01 13:26:25     1.56
+++ rc.h 2003/07/02 15:31:38     1.57
@@ -60,14 +60,15 @@
     RC_ERR_IO  = 5,   /* Input/output error       */
     RC_ERR_INT = 6,   /* Internal error           */
     RC_ERR_FNC = 7,   /* Func file not found      */
-    RC_ERR_DIR = 8,   /* Location dir not found   */
-    RC_ERR_RCF = 9,   /* Rc file not found        */
-    RC_ERR_TRM = 10,  /* Request to terminate app */
-    RC_ERR_CFG = 11,  /* Config or option failure */
-    RC_ERR_ROOT = 12, /* Process must run as root */
-    RC_WRN_0   = 13,  /* Warning base             */
-    RC_WRN_OWR = 14,  /* Overwrite warning        */
-    RC_WRN_NUL = 15   /* NULL pointer warning     */
+    RC_ERR_LOC = 8,   /* Location dir not found   */
+    RC_ERR_TMP = 9,   /* Temporary dir not found  */
+    RC_ERR_RCF = 10,  /* Rc file not found        */
+    RC_ERR_TRM = 11,  /* Request to terminate app */
+    RC_ERR_CFG = 12,  /* Config or option failure */
+    RC_ERR_ROOT = 13, /* Process must run as root */
+    RC_WRN_0   = 14,  /* Warning base             */
+    RC_WRN_OWR = 15,  /* Overwrite warning        */
+    RC_WRN_NUL = 16   /* NULL pointer warning     */
 } rc_return_t;
 
 /* Config function prototypes */


ossp-pkg/rc/rc_const.h 1.31 -> 1.32

--- rc_const.h   2003/07/02 14:45:25     1.31
+++ rc_const.h   2003/07/02 15:31:38     1.32
@@ -123,7 +123,8 @@
 #define RC_ERRSTR_IO   "Input/Output"
 #define RC_ERRSTR_INT  "Internal"
 #define RC_ERRSTR_FNC  "Funcfile"
-#define RC_ERRSTR_DIR  "Location"
+#define RC_ERRSTR_LOC  "Location"
+#define RC_ERRSTR_TMP  "Tempdir"
 #define RC_ERRSTR_RCF  "Rcfile"
 #define RC_ERRSTR_TRM  "Terminate"
 #define RC_ERRSTR_CFG  "Config/Options"


ossp-pkg/rc/rc_list.c 1.2 -> 1.3

--- rc_list.c    2003/06/27 14:26:13     1.2
+++ rc_list.c    2003/07/02 15:31:38     1.3
@@ -100,7 +100,7 @@
 
                 /* First just learn how many globbed files we have */
                 if ((pLocdir = opendir(szLocations)) == NULL)
-                    return(RC_THROW(RC_ERR_DIR));
+                    return(RC_THROW(RC_ERR_LOC));
                 for (pDirent = readdir(pLocdir); pDirent; pDirent = readdir(pLocdir))
                     if (!strncmp(pDirent->d_name, "rc.", strlen("rc.")))
                         nCount++;
@@ -108,13 +108,13 @@
 
                 /* Prepare resources before entering rcfile allocation loop */
                 if (nCount == 0) /* Check out the health of this directory listing */
-                    return(RC_THROW(RC_ERR_DIR));
+                    return(RC_THROW(RC_ERR_LOC));
                 nIter = 0; /* Used in the next for block, so initialize */
                 pInst->m_ppFilevec = calloc(nCount + 1, sizeof (rc_file_t *));
                 if (!pInst->m_ppFilevec) /* Guard against memory overruns */
                     return(RC_THROW(RC_ERR_MEM));
                 if ((pLocdir = opendir(szLocations)) == NULL)
-                    return(RC_THROW(RC_ERR_DIR));
+                    return(RC_THROW(RC_ERR_LOC));
 
                 /* Loop through file index setting rc file names according to dirent */
                 for (pDirent = readdir(pLocdir); pDirent; pDirent = readdir(pLocdir))


ossp-pkg/rc/rc_util.c 1.11 -> 1.12

--- rc_util.c    2003/07/02 14:45:25     1.11
+++ rc_util.c    2003/07/02 15:31:38     1.12
@@ -44,7 +44,8 @@
     else if (rv == RC_ERR_IO)   return RC_ERRSTR_IO;
     else if (rv == RC_ERR_INT)  return RC_ERRSTR_INT;
     else if (rv == RC_ERR_FNC)  return RC_ERRSTR_FNC;
-    else if (rv == RC_ERR_DIR)  return RC_ERRSTR_DIR;
+    else if (rv == RC_ERR_LOC)  return RC_ERRSTR_LOC;
+    else if (rv == RC_ERR_TMP)  return RC_ERRSTR_TMP;
     else if (rv == RC_ERR_RCF)  return RC_ERRSTR_RCF;
     else if (rv == RC_ERR_TRM)  return RC_ERRSTR_TRM;
     else if (rv == RC_ERR_CFG)  return RC_ERRSTR_CFG;

CVSTrac 2.0.1