projects
/
project
/
fstools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
block.c: Make static string a const char * instead char *
[project/fstools.git]
/
block.c
diff --git
a/block.c
b/block.c
index
c6d1b90
..
71ffd0b
100644
(file)
--- a/
block.c
+++ b/
block.c
@@
-627,7
+627,7
@@
static void check_filesystem(struct blkid_struct_probe *pr)
{
pid_t pid;
struct stat statbuf;
{
pid_t pid;
struct stat statbuf;
- char *e2fsck = "/usr/sbin/e2fsck";
+ c
onst c
har *e2fsck = "/usr/sbin/e2fsck";
/* UBIFS does not need stuff like fsck */
if (!strncmp(pr->id->name, "ubifs", 5))
/* UBIFS does not need stuff like fsck */
if (!strncmp(pr->id->name, "ubifs", 5))
@@
-1101,7
+1101,8
@@
static int mount_extroot(char *cfg)
if (check_fs)
check_filesystem(pr);
if (check_fs)
check_filesystem(pr);
- err = mount(pr->dev, path, pr->id->name, 0, (m->options) ? (m->options) : (""));
+ err = mount(pr->dev, path, pr->id->name, m->flags,
+ (m->options) ? (m->options) : (""));
if (err) {
ULOG_ERR("extroot: mounting %s (%s) on %s failed: %d (%s)\n",
if (err) {
ULOG_ERR("extroot: mounting %s (%s) on %s failed: %d (%s)\n",
@@
-1433,6
+1434,14
@@
int main(int argc, char **argv)
if (!strcmp(argv[1], "umount"))
return main_umount(argc, argv);
if (!strcmp(argv[1], "umount"))
return main_umount(argc, argv);
+
+ if (!strcmp(argv[1], "remount")) {
+ int ret = main_umount(argc, argv);
+
+ if (!ret)
+ ret = main_mount(argc, argv);
+ return ret;
+ }
}
ULOG_ERR("Usage: block <info|mount|umount|detect>\n");
}
ULOG_ERR("Usage: block <info|mount|umount|detect>\n");