nsenter: allow arguments to be specified in any order

Allows 'nsenter -mt $PID', which would fail previously.

[kzak@redhat.com: - fix open_target_fd() arguments]

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
nsenter: rename --exec/-e to --no-fork/-F

The naming of this option was really confusing.
Just rename it for clarity.

[kzak@redhat.com: rebase to original code without --all]

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
build-sys: add nsenter to gitignore

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
nsenter: adjust few error messages

The 'neither filename nor target' is changed to use errx() rather than
err(), because the errno is indicating success at the time of fatal error
which is wrong message for an user.

The "cannot open %s" is same string as in other files, making translators
to work less.

Remaining changes aim to ease understanding what went wrong for a
non-programmer audience.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
nsenter: fix compiler warning

nsenter.c:53:2: warning: ISO C forbids empty initializer braces [-pedantic]

[kzak@redhat.com: - use initialize .fd to -1]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
nsenter: drop core when impossible happens

Message to user is less informative, but impossible events should be
rare so core files are much appriciated for these cases.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
nsenter: fix indentation

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: align nsenter.1 man page with howto-man-page.txt

Most visible change; the --target option has a path - explanation table
instead a long paragraph.  This makes pairing of the information easier
for an average user such as me.

The rest of the changes are about aligning with howto, i.e., fix spaces
after dots, URL & mail address macros, remove inline emphasis where
possible, mark directory paths and words with underscore to be line
breakable, use optional option syntax from howto, cut line lenght to 80
chars.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
nsenter: respect --exec no matter where it appears

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>