Re: [PATCH 2/5] Convert earlyModuleLoad to use cmdline_argv (#569883)

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

 



On 03/08/2011 07:55 AM, Brian C. Lane wrote:
+/* parsed /proc/cmdline */
+extern char **cmdline_argv;
+extern int cmdline_argc;
+

Should this live in loader.h or somewhere?

  /* returns whether or not we can probe devices automatically or have to
   * ask for them manually. */
  int canProbeDevices(void) {
@@ -216,30 +220,15 @@ int probeiSeries(moduleInfoSet modInfo, moduleList modLoaded,
   */
  int earlyModuleLoad(moduleInfoSet modInfo, moduleList modLoaded,
                      moduleDeps modDeps, int justProbe) {
-    int fd, len, i;
-    char buf[1024], *cmdLine;
-    int argc;
-    char ** argv;
-
-    /* FIXME: reparsing /proc/cmdline to avoid major loader changes.
-     * should probably be done in loader.c:parseCmdline() like everything
-     * else
-     */
-    if ((fd = open("/proc/cmdline", O_RDONLY))<  0) return 1;
-    len = read(fd, buf, sizeof(buf) - 1);
-    close(fd);
-    if (len<= 0) return 1;
-
-    buf[len] = '\0';
-    cmdLine = buf;
-
-    if (poptParseArgvString(cmdLine,&argc, (const char ***)&argv))

Great, ack!

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux