svn commit: trunk/busybox/modutils

vapier at busybox.net vapier at busybox.net
Thu Feb 8 06:30:59 UTC 2007


Author: vapier
Date: 2007-02-07 22:30:58 -0800 (Wed, 07 Feb 2007)
New Revision: 17810

Log:
touchup style; no functional changes

Modified:
   trunk/busybox/modutils/modprobe.c


Changeset:
Modified: trunk/busybox/modutils/modprobe.c
===================================================================
--- trunk/busybox/modutils/modprobe.c	2007-02-07 23:20:32 UTC (rev 17809)
+++ trunk/busybox/modutils/modprobe.c	2007-02-08 06:30:58 UTC (rev 17810)
@@ -264,8 +264,7 @@
 					/* handle alias as a module dependent on the aliased module */
 					if (!*current) {
 						(*first) = (*current) = xzalloc(sizeof(struct dep_t));
-					}
-					else {
+					} else {
 						(*current)->m_next = xzalloc(sizeof(struct dep_t));
 						(*current) = (*current)->m_next;
 					}
@@ -275,16 +274,14 @@
 					if ((strcmp(mod, "off") == 0) || (strcmp(mod, "null") == 0)) {
 						(*current)->m_depcnt = 0;
 						(*current)->m_deparr = 0;
-					}
-					else {
+					} else {
 						(*current)->m_depcnt  = 1;
 						(*current)->m_deparr  = xmalloc(1 * sizeof(char *));
 						(*current)->m_deparr[0] = xstrdup(mod);
 					}
 					(*current)->m_next    = 0;
 				}
-			}
-			else if ((strncmp(buffer, "options", 7) == 0) && isspace(buffer[7])) {
+			} else if ((strncmp(buffer, "options", 7) == 0) && isspace(buffer[7])) {
 				char *mod, *opt;
 
 				/* split the line in the module/alias name, and options */
@@ -307,8 +304,7 @@
 						}
 					}
 				}
-			}
-			else if ((strncmp(buffer, "include", 7) == 0) && isspace(buffer[7])) {
+			} else if ((strncmp(buffer, "include", 7) == 0) && isspace(buffer[7])) {
 				int fdi; char *filename;
 
 				filename = skip_whitespace(buffer + 8);
@@ -323,7 +319,7 @@
 }
 
 /*
- * This function builds a list of dependency rules from /lib/modules/`uname -r`\modules.dep.
+ * This function builds a list of dependency rules from /lib/modules/`uname -r`/modules.dep.
  * It then fills every modules and aliases with their default options, found by parsing
  * modprobe.conf (or modules.conf, or conf.modules).
  */
@@ -411,8 +407,7 @@
 				/* enqueue new module */
 				if (!current) {
 					first = current = xmalloc(sizeof(struct dep_t));
-				}
-				else {
+				} else {
 					current->m_next = xmalloc(sizeof(struct dep_t));
 					current = current->m_next;
 				}
@@ -425,12 +420,10 @@
 				current->m_next    = 0;
 
 				p = col + 1;
-			}
-			else
+			} else
 				/* this line is not a dep description */
 				p = 0;
-		}
-		else
+		} else
 			/* It's a dep description continuation */
 			p = buffer;
 
@@ -454,8 +447,7 @@
 				if (next) {
 					*next = 0;
 					next--;
-				}
-				else
+				} else
 					next = end;
 
 				/* find the beginning of the module file name */
@@ -648,8 +640,7 @@
 
 				if (do_insert) {
 					rc = rc2; /* only last module matters */
-				}
-				else if (!rc2) {
+				} else if (!rc2) {
 					rc = 0; /* success if remove any mod */
 				}
 			}
@@ -747,13 +738,11 @@
 					opts = opts->m_next;
 				}
 				dt = adt;
-			}
-			else {
+			} else {
 				bb_error_msg("module %s not found", mod);
 				return;
 			}
-		}
-		else {
+		} else {
 			bb_error_msg("bad alias %s", dt->m_name);
 			return;
 		}




More information about the busybox-cvs mailing list