[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
/proc/sys/kernel/real-root-dev
From: |
Juan Pedro Vallejo |
Subject: |
/proc/sys/kernel/real-root-dev |
Date: |
Thu, 12 Dec 2002 03:47:00 +0100 |
Hello.
# parted /dev/hdc
Warning: Unable to determine if partitions are mounted via
/proc/mounts or /etc/mtab. Make sure you don't attempt to resize or
modify mounted file systems. (Even read-only mounted)
Ignore/Cancel?
Version 1.6.4. I don't have a /proc/sys/kernel/real-root-dev file, so
_partition_is_root_device() always fails. Shouldn't it return "I don't
know" instead, like _mount_table_search() does?.
And why the checks in _partition_is_mounted_by_path() are not taken
sequentially?. Like this:
static int
_partition_is_mounted_by_path (const char* path)
{
static int can_probe = 1;
if (!can_probe)
return 0;
/* try first way */
switch (_partition_is_root_device (path)) {
case 1: return 1; /* it is here */
case 0: return 0; /* it is not */
}
/* we don't know, try second way */
switch (_mount_table_search ("/proc/mounts", path)) {
case 1: return 1; /* it is here */
case 0: return 0; /* it is not */
}
/* we don't know, try third way */
switch (_mount_table_search ("/etc/mtab", path)) {
case 1: return 1; /* it is here */
case 0: return 0; /* it is not */
}
/* we don't know, try last way */
switch (_mount_table_search ("/proc/swaps", path)) {
case 1: return 1; /* it is here */
case 0: return 0; /* it is not */
}
/* we still don't know, and never will */
can_probe = 0;
/* ask the animal */
return ped_exception_throw (...) != PED_EXCEPTION_IGNORE;
}
Also, the message does not mention the other two files it looks at.
Juan Pedro.
- /proc/sys/kernel/real-root-dev,
Juan Pedro Vallejo <=