On 21 July 2017 at 05:10, Fam Zheng <f...@redhat.com> wrote: > On Thu, 07/20 19:06, 陳培泓 wrote: >> I build qemu from the https://github.com/qemu/qemu, and it didn't show any >> errors. >> >> I tried qemu-nbd --object secret,id=sec0... >> but it shows unrecognized option '--object ' >> >> how to solve it? > > -object it is. Thanks.
Hmm? For me the help message says '--object' and the implementation agrees that it wants two hyphens: $ ./build/x86/qemu-nbd -object foo Invalid offset `bject' [ie interpreting it as -o plus an argument] $ ./build/x86/qemu-nbd --object foo Invalid number of arguments Try `./build/x86/qemu-nbd --help' for more information. [ie it recognized the option] My guesses for why the original poster is getting 'unrecognized option' are either: (1) if the error message really has a space after "t" and before the closing "'" then they're probably invoking qemu-nbd via a script whose quoting is wrong and is passing the literal string "--object " with a trailing space by mistake (2) otherwise, accidentally running the system qemu-nbd (which is presumably an old version without this option) rather than the one they've just built from git ? thanks -- PMM