mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 19:30:07 +01: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.
|
||||
* Needs to be read-only, because we don't run udev. */
|
||||
if (mount (NULL, "/sys", "sysfs", MS_SLAVE, NULL) != 0) {
|
||||
errsv = errno;
|
||||
g_error ("mount(\"/\", MS_SLAVE) failed with %s (%d)", strerror (errsv), errsv);
|
||||
}
|
||||
mount (NULL, "/sys", "sysfs", MS_SLAVE, NULL);
|
||||
if (mount ("sys", "/sys", "sysfs", MS_RDONLY, NULL) != 0) {
|
||||
errsv = errno;
|
||||
g_error ("mount(\"/sys\") failed with %s (%d)", strerror (errsv), errsv);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue