Fwd: Re: [PATCH] hard-coded paths the second

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi


  I have doubts that everyone has /sbin, /lib[64], /usr/lib[64] or
  /opt/*/bin in $PATH.



  Please, use the current bindir[] as a template and modify the array
  according to the $PATH.


What is the rationale here to include that hard-coded binary-paths that
are not in PATH? Backwards compatibility towards the bug?
I just tried to fix an obvious flaw, but now I am not sure anymore what
the intended behaviour is.

+	char **dirp = dirs;
+	*(dirp++) = buf;
+	for(cp=buf;*cp;cp++)
+		if (*cp == ':') {
+			*cp = 0;
+			*(dirp++) = cp + 1;
+		}
+	dirp = 0;	
+	return dirs;
+}


  Please, read http://www.kernel.org/doc/Documentation/CodingStyle
  or follow the current coding style in whereis.c

I am new to kernel coding style, is this about missing braces after the
for-header.
I was going with "Do not unnecessarily use braces where a single
statement will do." there, but you can argue whether a for loop is a
single statement.
I will try to adjust the complete file to Kernel Coding Style at this
occasion.

Peter

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux