25 lines
892 B
Diff
25 lines
892 B
Diff
--- origsrc/lib/root-dev-ino.c 2023-07-05 05:09:55.000000000 -0600
|
|
+++ src/lib/root-dev-ino.c 2023-09-09 20:00:54.772122500 -0600
|
|
@@ -25,13 +25,17 @@
|
|
/* Call lstat to get the device and inode numbers for '/'.
|
|
Upon failure, return NULL. Otherwise, set the members of
|
|
*ROOT_D_I accordingly and return ROOT_D_I. */
|
|
-struct dev_ino *
|
|
-get_root_dev_ino (struct dev_ino *root_d_i)
|
|
+struct root_dev_ino *
|
|
+get_root_dev_ino (struct root_dev_ino *root_d_i)
|
|
{
|
|
struct stat statbuf;
|
|
if (lstat ("/", &statbuf))
|
|
return nullptr;
|
|
- root_d_i->st_ino = statbuf.st_ino;
|
|
- root_d_i->st_dev = statbuf.st_dev;
|
|
+ root_d_i->single_slash.st_ino = statbuf.st_ino;
|
|
+ root_d_i->single_slash.st_dev = statbuf.st_dev;
|
|
+ if (lstat ("//", &statbuf))
|
|
+ return nullptr;
|
|
+ root_d_i->double_slash.st_ino = statbuf.st_ino;
|
|
+ root_d_i->double_slash.st_dev = statbuf.st_dev;
|
|
return root_d_i;
|
|
}
|