[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] linux-user: added fake open() for /proc/self/cmdlin
From: |
lists |
Subject: |
[Qemu-devel] [PATCH] linux-user: added fake open() for /proc/self/cmdline |
Date: |
Tue, 17 Jun 2014 05:16:58 +0200 |
A piece of software I use depends on /proc/self/cmdline to determine the
command with which it was invoked.
When using linux-user, that file would read:
$ hd /proc/self/cmdline
00000000 2f 75 73 72 2f 62 69 6e 2f 71 65 6d 75 2d 61 72
|/usr/bin/qemu-ar|
00000010 6d 2d 73 74 61 74 69 63 00 2f 75 73 72 2f 62 69
|m-static./usr/bi|
00000020 6e 2f 68 64 00 2f 70 72 6f 63 2f 73 65 6c 66 2f
|n/hd./proc/self/|
00000030 63 6d 64 6c 69 6e 65 00 |cmdline.|
With this patch, the first word is omitted from the process's own cmdline
entry, removing the emulator path from the file:
$ hd /proc/self/cmdline
00000000 2f 75 73 72 2f 62 69 6e 2f 68 64 00 2f 70 72 6f
|/usr/bin/hd./pro|
00000010 63 2f 73 65 6c 66 2f 63 6d 64 6c 69 6e 65 00
|c/self/cmdline.|
0000001f
Kind regards,
Wim
- [Qemu-devel] [PATCH] linux-user: added fake open() for /proc/self/cmdline,
lists <=