Hi Eric, a couple of POSIX questions for you from nbdkit. The first question is from an AUR comment on nbdkit:
https://aur.archlinux.org/packages/nbdkit#comment-937381 I think there's a bash-ism in the logscript parameter in this test: https://gitlab.com/nbdkit/nbdkit/-/blame/master/tests/test-log-script-info.sh#L51 I believe it is happening in the $(( .. )) expression. How do we write that so it'll work in a posix shell? - - - Secondly while looking into this I was trying variations on: $ POSIXLY_CORRECT=1 ./nbdkit -fv data '1 2 3' --run 'nbdinfo $uri' This doesn't actually cause bash to emulate a posix shell, but it does uncover a different bug: nbdkit: error: raw|base64|data parameter must be specified exactly once This seems to be happening because getopt_long in wrapper.c behaves somehow differently parsing when POSIXLY_CORRECT is set. However I couldn't work out exactly why. https://gitlab.com/nbdkit/nbdkit/-/blob/master/wrapper.c?ref_type=heads#L278 I guess the wrapper ought to work if POSIXLY_CORRECT is set (?) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs