1. 21 5月, 2013 35 次提交
  2. 20 5月, 2013 5 次提交
    • O
      qemu: Add callback struct for qemuBuildCommandLine · 3a6204cb
      Osier Yang 提交于
      Since 0d70656a, it starts to access the sysfs files to build
      the qemu command line (by virSCSIDeviceGetSgName, which is to find
      out the scsi generic device name by adpater:bus:target:unit), there
      is no way to work around, qemu wants to see the scsi generic device
      like "/dev/sg6" anyway.
      
      And there might be other places which need to access sysfs files
      when building qemu command line in future.
      
      Instead of increasing the arguments of qemuBuildCommandLine, this
      introduces a new callback for qemuBuildCommandLine, and thus tests
      can register their own callbacks for sysfs test input files accessing.
      
      * src/qemu/qemu_command.h: (New callback struct
                                  qemuBuildCommandLineCallbacks;
                                  extern buildCommandLineCallbacks)
      * src/qemu/qemu_command.c: (wire up the callback struct)
      * src/qemu/qemu_driver.c: (Use the new syntax of qemuBuildCommandLine)
      * src/qemu/qemu_hotplug.c: Likewise
      * src/qemu/qemu_process.c: Likewise
      * tests/testutilsqemu.[ch]: (Helper testSCSIDeviceGetSgName;
                                   callback struct testCallbacks;)
      * tests/qemuxml2argvtest.c: (Use testCallbacks)
      * src/tests/qemuxmlnstest.c: (Like above)
      3a6204cb
    • O
      storage_conf: Improve the coding style in storage_conf.h · 8b7b43a1
      Osier Yang 提交于
      Changes:
        * Remove useless comments
        * Remove useless blank lines
        * If the struct member is a enum type, comment it like
          /* enum fooBar */
        * Break the long lines
        * Prefer the common function style for the inline function
      8b7b43a1
    • O
      storage_conf: Fix indentions in storage_conf.c · 76359ee5
      Osier Yang 提交于
      Uses the 4 spaces for indention.
      76359ee5
    • O
      storage_conf: Fix the coding stype in storage_conf.c · c8a3cf89
      Osier Yang 提交于
      Changes:
        * Remove the useless space in "for" statement (e.g.
          for (i = 0 ; i < something ; i++)
      
        * Change the function's style to:
          void
          foo(bar)
          {
              printf("foo is not bar\n");
          }
      
        * Don't lose "{}" for "if...else" branches if one of the branch
          has more than one line block. Example of the old ones:
          if (a) {
              printf("a is not funny");
          } else
              printf("a is funny");
      
        * Remove the 1 space before "goto" label.
      
        * Remove the useless blank line(s)
      
        * Add blank line if it can make the code more clear to eyes.
      c8a3cf89
    • O
      479d5991