mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 10:08:05 +02:00
test: don't fail if setting /sys as a slave mount doesn't succeed
Maybe it's not mounted in the first place. We could be running in a chroot without /sys mounted, etc. Also, the error message was wrong.
This commit is contained in:
parent
ea00693b00
commit
6e5fbf096a
1 changed files with 1 additions and 4 deletions
|
|
@ -878,10 +878,7 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
/* Mount our /sys instance, so that gudev sees only our devices.
|
/* Mount our /sys instance, so that gudev sees only our devices.
|
||||||
* Needs to be read-only, because we don't run udev. */
|
* Needs to be read-only, because we don't run udev. */
|
||||||
if (mount (NULL, "/sys", "sysfs", MS_SLAVE, NULL) != 0) {
|
mount (NULL, "/sys", "sysfs", MS_SLAVE, NULL);
|
||||||
errsv = errno;
|
|
||||||
g_error ("mount(\"/\", MS_SLAVE) failed with %s (%d)", strerror (errsv), errsv);
|
|
||||||
}
|
|
||||||
if (mount ("sys", "/sys", "sysfs", MS_RDONLY, NULL) != 0) {
|
if (mount ("sys", "/sys", "sysfs", MS_RDONLY, NULL) != 0) {
|
||||||
errsv = errno;
|
errsv = errno;
|
||||||
g_error ("mount(\"/sys\") failed with %s (%d)", strerror (errsv), errsv);
|
g_error ("mount(\"/sys\") failed with %s (%d)", strerror (errsv), errsv);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue