From 00641fbdd8a39979ac52a0d513d2ec8d055c3363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 26 Jun 2004 01:38:20 +0000 Subject: [PATCH] Now maintains and exports a variable that points to the boot device. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8169 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/fs/vfs.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kernel/core/fs/vfs.cpp b/src/kernel/core/fs/vfs.cpp index e4c8ac9dc3..b21297d4d0 100755 --- a/src/kernel/core/fs/vfs.cpp +++ b/src/kernel/core/fs/vfs.cpp @@ -114,6 +114,9 @@ static struct vnode *sRoot; static hash_table *sMountsTable; static mount_id sNextMountID = 0; +// This can be used by other code to see if there is a boot file system already +dev_t gBootDevice = -1; + /* function declarations */ @@ -1660,12 +1663,12 @@ vfs_mount_boot_file_system() } else put_file_system(bootfs); - dev_t bootDevice = sNextMountID - 1; + gBootDevice = sNextMountID - 1; // create link for the name of the boot device fs_info info; - if (_kern_read_fs_info(bootDevice, &info) == B_OK) { + if (_kern_read_fs_info(gBootDevice, &info) == B_OK) { char path[B_FILE_NAME_LENGTH + 1]; snprintf(path, sizeof(path), "/%s", info.volume_name);