no trailing spaces
authorErez Zadok <ezk@cs.sunysb.edu>
Sun, 28 Aug 2005 00:06:28 +0000 (00:06 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 28 Aug 2005 00:06:28 +0000 (00:06 +0000)
ChangeLog
amd/mapc.c
amd/sun2amd.8
amd/sun2amd.c
amd/sun_map.c
amd/sun_map.h
amd/sun_map_parse.y

index bbd839a39a42ea18e897d544308fbb7ba97cfad9..ddc3482c2cf6ec4d76f559d08e94ae931656980e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,7 @@
 
        * amd/mapc.c (mapc_add_kv): Add support for multiple entries
        packed into one line.  This is a workaround for handling Sun style
-       mounts that contains multiple entries on one line "multi-mount
+       mounts that contains multiple entries on one line: "multi-mount
        entries".  The sun2amd conversion tools will convert such entries
        into type:=auto and pack each of the auto-entries into one line
        separated by '\n'.  The mapc_add_kv function will now recognize
@@ -36,7 +36,7 @@
        files.  Therefore, the line number will always be 1.  It is now up
        to the higher level tools to echo line information during error
        when they feed the parser.
-       
+
 2005-08-24  Erez Zadok  <ezk@cs.sunysb.edu>
 
        * configure.in: wrap all LDAP and HESIOD tests in test whether
index adee1897ae89ae2bdff3dbd4caef7da3d1a25cfc..206287c4727b73fc7137d972d69e49d6a8bb2bed 100644 (file)
@@ -427,7 +427,7 @@ mapc_add_kv(mnt_map *m, char *key, char *val)
 #endif /* HAVE_REGEXEC */
 
   dlog("add_kv: %s -> %s", key, val);
-  
+
   if (val != NULL && strchr(val, '\n') != NULL) {
     /*
      * If the entry value contains multiple lines we need to break
@@ -438,7 +438,7 @@ mapc_add_kv(mnt_map *m, char *key, char *val)
      * each type:=auto entry on the same line separated by '\n'.
      */
     char *entry, *tok;
-    
+
     /*
      * The first line should contain the first entry.  The key for
      * this entry is the key passed into this function.
@@ -446,7 +446,7 @@ mapc_add_kv(mnt_map *m, char *key, char *val)
     if ((tok = strtok(val, "\n")) != NULL) {
       mapc_add_kv(m, key, strdup(tok));
     }
-    
+
     /*
      * For the rest of the entries we need to tokenize them by '\n'
      * and separate the keys from there entries.
@@ -458,14 +458,14 @@ mapc_add_kv(mnt_map *m, char *key, char *val)
       if (*entry) {
        *entry++ = '\0';
       }
-      
+
       mapc_add_kv(m, strdup(key), strdup(entry));
     }
-    
+
     XFREE(val);
     return;
   }
-  
+
 #ifdef HAVE_REGEXEC
   if (MAPC_ISRE(m)) {
     char pattern[MAXPATHLEN];
@@ -1212,6 +1212,6 @@ get_full_path(const char *map, const char *path, const char *type)
       return full_path;
     str = strtok(NULL, ":");
   } while (str);
-  
+
   return map;                  /* if found nothing, return map */
 }
index da25f27f6aa31bfe3604f6b1dde401af3c2c864a..45165bc3ecf0f9cb722f3ce06cd7c4ab8cc7820b 100644 (file)
@@ -52,7 +52,7 @@ sun2amd \- converts Sun automount maps to Amd maps
 .SH DESCRIPTION
 .B sun2amd
 is used to convert Sun style automount maps to Amd style automount
-maps.  By default 
+maps.  By default
 .B sun2amd
 reads from stdin and writes to stdout.
 
@@ -74,7 +74,7 @@ auto.amd type:
 .B sun2amd
 -i auto_foo -o auto.amd
 
-.SH BUGS 
+.SH BUGS
 * Can not convert master maps yet.
 
 * NFS is the only automount type currently supported.
index 8cc9dd83a98d8a7155b40bd792c71567545f491d..ea3971e0e7c1e90316b6a33cbd10087ab0c59cca 100644 (file)
@@ -75,7 +75,7 @@ sun2amd_convert(FILE *sun_in, FILE *amd_out)
   while ((pos = file_read_line(line_buff, sizeof(line_buff), sun_in))) {
     line++;
     line_buff[pos - 1] = '\0';
-    
+
     /* remove comments */
     if ((tmp = strchr(line_buff, '#')) != NULL) {
       *tmp = '\0';
@@ -113,12 +113,12 @@ sun2amd_convert(FILE *sun_in, FILE *amd_out)
       plog(XLOG_ERROR, "parse error on line %d", line);
       goto err;
     }
-    
+
     if (fprintf(amd_out, "%s %s\n", key, tmp) < 0) {
-      plog(XLOG_ERROR, "can't write to output stream: %s", strerror(errno)); 
+      plog(XLOG_ERROR, "can't write to output stream: %s", strerror(errno));
       goto err;
     }
-    
+
     /* just to be safe */
     memset(line_buff, 0, sizeof(line_buff));
   }
index 80496c28567ba9beb2cae5e34a0f65a0a89f3711..8c1d69d32dbd592e912b0d3277f6d26bbe2be7c9 100644 (file)
@@ -509,7 +509,7 @@ sun_multi2amd(char *dest,
  * param key     - automount key
  * param s_entry - Sun style automap entry
  *
- * return - Amd entry on succes, NULL on error 
+ * return - Amd entry on succes, NULL on error
  */
 char *
 sun_entry2amd(const char *key, const char *s_entry_str)
@@ -517,7 +517,7 @@ sun_entry2amd(const char *key, const char *s_entry_str)
   char *retval = NULL;
   char line_buff[INFO_MAX_LINE_LEN];
   struct sun_entry *s_entry = NULL;
-  
+
   /* For now the key should no be NULL. */
   if (key == NULL) {
     plog(XLOG_ERROR,"Sun key value was null");
@@ -537,7 +537,7 @@ sun_entry2amd(const char *key, const char *s_entry_str)
   }
 
   memset(line_buff, 0, sizeof(line_buff));
-  
+
   if (s_entry->opt_list != NULL) {
     /* write the mount options to the buffer  */
     sun_opts2amd(line_buff, sizeof(line_buff), key, s_entry->opt_list);
@@ -570,7 +570,7 @@ sun_entry2amd(const char *key, const char *s_entry_str)
        plog(XLOG_ERROR, "Sun fstype %s is currently not supported by Amd.",
             s_entry->fstype);
        goto err;
-       
+
       }
       else if (NSTREQ(s_entry->fstype, SUN_CACHEFS_TYPE, strlen(SUN_CACHEFS_TYPE))) {
        /* CacheFS Type */
@@ -590,7 +590,7 @@ sun_entry2amd(const char *key, const char *s_entry_str)
       retval = strdup(line_buff);
     }
   }
-  
+
  err:
   if (s_entry != NULL) {
     XFREE(s_entry);
index 514cd101b36ee45d677308479d95058ad4f7348b..863992fecc32c37cc7fbcebc74a186a0fe6f3385 100644 (file)
@@ -84,8 +84,8 @@ struct sun_entry {
   struct sun_mountpt  *mountpt_list;  /* list of mount points */
 };
 
-/* 
- * automount map file 
+/*
+ * automount map file
  *
  * XXX: Only a place holder structure, not implemented yet.
  */
@@ -100,8 +100,8 @@ struct sun_map {
   struct sun_entry *entry_list;   /* list of 'struct s2a_entry' */
 };
 
-/* 
- * master map file 
+/*
+ * master map file
  *
  * XXX: Only a place holder structure, not implemented yet.
  */
index 2914ef09d9b5d2d77d45e85053ea9797bb1c3b95..2ee7a8aef9ad3e1fcbe56de22b97118a2fdc102d 100644 (file)
@@ -98,7 +98,7 @@ file : new_lines entries
      | entries
      ;
 
-entries : entry 
+entries : entry
         | entry new_lines
         | entry new_lines entries
         ;
@@ -215,7 +215,7 @@ entry : locations {
   list = get_sun_opt_list();
   entry->opt_list = (struct sun_opt *)list->first;
   sun_opt_list = NULL;
-  
+
   /* Add this entry to the entry list. */
   sun_list_add(get_sun_entry_list(), (qelem *)entry);
 }
@@ -441,7 +441,7 @@ sun_map_parse_read(const char *map_data)
   else {
     plog(XLOG_ERROR, "Sun map parser did not produce data structs.");
   }
-  
+
   return retval;
 }