search for: mnt_type

Displaying 20 results from an estimated 20 matches for "mnt_type".

Did you mean: int_type
2019 Jan 18
0
[klibc:master] mount_main: Fix empty string check
...k> CommitDate: Wed, 2 Jan 2019 03:08:04 +0000 [klibc] mount_main: Fix empty string check gcc 7.3.0 complains: ``` usr/utils/mount_main.c: In function ?print_mount?: usr/utils/mount_main.c:46:46: warning: comparison between pointer and zero character constant [-Wpointer-compare] if (mnt->mnt_type != NULL && mnt->mnt_type != '\0') ^~ usr/utils/mount_main.c:46:32: note: did you mean to dereference the pointer? if (mnt->mnt_type != NULL && mnt->mnt_type != '\0') ^ usr/utils...
2008 Jul 03
1
extlinux and install script
...cannot open device proc But /mnt/boot is mounted on /dev/sda1 and ext3 file system. I read the source code and found the following code in install_loader() if ( (mtab = setmntent("/proc/mounts", "r")) ) { while ( (mnt = getmntent(mtab)) ) { if ( (!strcmp(mnt->mnt_type, "ext2") || !strcmp(mnt->mnt_type, "ext3")) && !stat(mnt->mnt_fsname, &dst) && dst.st_rdev == st.st_dev ) { devname = mnt->mnt_fsname; break; } } } if ( !devname ) { /* Didn't f...
2018 Jun 18
1
[PATCH v3 1/2] Implement classless static routes
Implement classless static routes support as specified in RFC3442. Bug-Debian: https://bugs.debian.org/884716 Bug-Ubuntu: https://launchpad.net/bugs/1526956 Signed-off-by: Benjamin Drung <benjamin.drung at profitbricks.com> --- usr/kinit/ipconfig/bootp_proto.c | 109 +++++++++++++++++++++++++++++++ usr/kinit/ipconfig/dhcp_proto.c | 1 + usr/kinit/ipconfig/main.c | 54
2008 Sep 05
0
initial mntent.h, mount features, ipconfig fixes
..._noreturn print_mount(char *type) { FILE *mfp; struct mntent *mnt; @@ -40,6 +40,8 @@ static __noreturn print_mount(void) while ((mnt = getmntent(mfp)) != NULL) { if (mnt->mnt_fsname && !strncmp(mnt->mnt_fsname, "no", 2)) continue; + if (type && mnt->mnt_type && strcmp(type, mnt->mnt_type)) + continue; printf("%s on %s", mnt->mnt_fsname, mnt->mnt_dir); if (mnt->mnt_type != NULL && mnt->mnt_type != '\0') printf (" type %s", mnt->mnt_type); @@ -136,6 +138,9 @@ int main(int argc, cha...
2008 Sep 07
1
[git pull v2] initial mntent.h, mount features, ipconfig fixes
..._noreturn print_mount(char *type) { FILE *mfp; struct mntent *mnt; @@ -40,6 +40,8 @@ static __noreturn print_mount(void) while ((mnt = getmntent(mfp)) != NULL) { if (mnt->mnt_fsname && !strncmp(mnt->mnt_fsname, "no", 2)) continue; + if (type && mnt->mnt_type && strcmp(type, mnt->mnt_type)) + continue; printf("%s on %s", mnt->mnt_fsname, mnt->mnt_dir); if (mnt->mnt_type != NULL && mnt->mnt_type != '\0') printf (" type %s", mnt->mnt_type); @@ -136,6 +138,9 @@ int main(int argc, cha...
2011 Jul 07
5
[PATCH 0/5] checkpatch cleanups
It seems checkpatch errors krept in, this is a first go. Next run will go into usr/kinit directory. No code changes, just codingstyle fixes (verified with size(3)). maximilian attems (5): [klibc] sleep: have argument on next line [klibc] readklink: remove unneeded braces [klibc] mount: whitespace policy [klibc] ls: fix various checkpatch complaints [klibc] tests: checkpatch fixlets
2012 Mar 08
3
[PATCH 0/3] kinit: Allow mount options
This patch series allows user-specified mount commands to be sent in via kernel command line ("kinit_mount=...") or via an embedded /etc/fstab file. The first patch is a cleanup of a patch sent last November by San Mehat (http://web.archiveorange.com/archive/v/EazJNBMORV2U7E0coh5h); the next two are small improvements or bug fixes.
2008 Jul 23
2
[RFC] klibc add minimal mntent.h
...nore" /* Ignore this entry. */ +#define MNTTYPE_SWAP "swap" /* Swap device. */ + +/* Structure describing a mount table entry. */ +struct mntent +{ + char *mnt_fsname; /* Device or server for filesystem. */ + char *mnt_dir; /* Directory mounted on. */ + char *mnt_type; /* Type of filesystem: ufs, nfs, etc. */ + char *mnt_opts; /* Comma-separated options for fs. */ + int mnt_freq; /* Dump frequency (in days). */ + int mnt_passno; /* Pass number for `fsck'. */ +}; + +#endif /* mntent.h */
2013 Jul 19
0
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...O_RDONLY|O_DIRECTORY); > if (pfd < 0) > goto err; > @@ -1063,6 +1083,17 @@ static const char *find_device(const char *mtab_file, dev_t dev) > done = true; > break; > } > + > + break; > + case UFS1: > + case UFS2: > + if (!strcmp(mnt->mnt_type, "ufs") && !stat(mnt->mnt_fsname, &dst) && > + dst.st_rdev == dev) { > + done = true; > + break; Don't need this break statement. -- Matt Fleming, Intel Open Source Technology Center
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...t pfd; int rv = -1; - + pfd = open(path, O_RDONLY|O_DIRECTORY); if (pfd < 0) goto err; @@ -1063,6 +1083,17 @@ static const char *find_device(const char *mtab_file, dev_t dev) done = true; break; } + + break; + case UFS1: + case UFS2: + if (!strcmp(mnt->mnt_type, "ufs") && !stat(mnt->mnt_fsname, &dst) && + dst.st_rdev == dev) { + done = true; + break; + } + + break; case NONE: break; } @@ -1187,7 +1218,7 @@ static int validate_device_btrfs(int pfd, int dfd) return -1; return 0; /* It's go...
2011 Nov 22
0
[PATCH] kinit: Add ability to mount filesystems via /etc/fstab or cmdline
..._fs_opts)) { + fprintf(stderr, "Skipping failed mount '%s'\n", + fs_name); + } + } + return 0; +} + +int do_fstab_mounts(FILE *fp) +{ + struct mntent *ent = NULL; + + while ((ent = getmntent(fp))) { + if (!mount_block(ent->mnt_fsname, + ent->mnt_dir, + ent->mnt_type, + 0, + ent->mnt_opts)) { + fprintf(stderr, "Skipping failed mount '%s'\n", + ent->mnt_fsname); + } + } + return 0; +} + int do_mounts(int argc, char *argv[]) { const char *root_dev_name = get_arg(argc, argv, "root="); const char *root_delay = g...
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...S_ISBLK(st_buf.st_mode)) { - file_rdev = st_buf.st_rdev; - } else { - file_dev = st_buf.st_dev; - file_ino = st_buf.st_ino; - } - } while ((mnt = getmntent (f)) != NULL) { - if (strcmp(file, mnt->mnt_fsname) == 0) - break; + /* Only check btrfs filesystems */ + if(strcmp(mnt->mnt_type, "btrfs") != 0) + continue; - if (stat(mnt->mnt_fsname, &st_buf) == 0) { - if (S_ISBLK(st_buf.st_mode)) { - if (file_rdev && (file_rdev == st_buf.st_rdev)) - break; - } else if (file_dev && ((file_dev == st_buf.st_dev) && - (file_ino ==...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...;min_offset = 0; + } else + break; + } + return subvol; +} + int install_file(const char *path, int devfd, struct stat *rst) { if (fs_type == EXT2 || fs_type == VFAT) @@ -546,19 +809,9 @@ static const char *find_device(const char *mtab_file, dev_t dev) if (!strcmp(mnt->mnt_type, "btrfs") && !stat(mnt->mnt_dir, &dst) && dst.st_dev == dev) { - char *opt = strstr(mnt->mnt_opts, BTRFS_SUBVOL_OPT); - - if (opt) { - if (!subvol[0]) { - char *tmp; - - strcpy(subvol, opt + sizeof(BTRFS_SUBVOL_OPT) - 1); -...
2013 Oct 25
8
[PATCH] btrfs: add framework to read fs info from btrfs-control
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs info through the btrfs-control Signed-off-by: Anand Jain <anand.jain@oracle.com> --- fs/btrfs/super.c | 47 ++++++++++++++++++++++++++++++++++++++----- fs/btrfs/volumes.c | 33 ++++++++++++++++++++++++++++++ fs/btrfs/volumes.h | 2 + include/uapi/linux/btrfs.h | 19 +++++++++++++++++ 4 files changed,
2011 Jan 22
32
Bug in mkfs.btrfs?!
Hi, I wanted to create a new btrfs fs for my backups. When trying to mkfs.btrfs for that device, I''m getting "error checking /dev/loop2 mount status" With strace I see where the problem is: lstat("/dev/disk/by-id/ata-INTEL_SSDSA2M160G2GC_CVPO939201JX160AGN-par", 0x7fffa30b3cf0) = -1 ENOENT (No such file or directory) The problem is there is something missing
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...t pfd; int rv = -1; - + pfd = open(path, O_RDONLY|O_DIRECTORY); if (pfd < 0) goto err; @@ -1063,6 +1088,16 @@ static const char *find_device(const char *mtab_file, dev_t dev) done = true; break; } + + break; + case UFS1: + case UFS2: + if (!strcmp(mnt->mnt_type, "ufs") && !stat(mnt->mnt_fsname, &dst) && + dst.st_rdev == dev) { + done = true; + } + + break; case NONE: break; } @@ -1187,7 +1222,7 @@ static int validate_device_btrfs(int pfd, int dfd) return -1; return 0; /* It's good! */ -}...
2013 Dec 17
9
[PATCH] Btrfs-progs: receive: fix the case that we can not find subvolume
...turn + * its corresponding device + */ +int mnt_to_dev(const char *mnt_dir, char **dev) +{ + struct mntent *mnt; + FILE *f; + int ret = -1; + + f = setmntent("/proc/self/mounts", "r"); + if (f == NULL) + return ret; + while ((mnt = getmntent(f)) != NULL) { + if (strcmp(mnt->mnt_type, "btrfs")) + continue; + if (strcmp(mnt->mnt_dir, mnt_dir)) + continue; + *dev = strdup(mnt->mnt_fsname); + if (*dev) + ret = 0; + break; + } + endmntent(f); + + return ret; +} + /* This finds the mount point for a given fsid, * subvols of the same fs/fsid can be mount...
2014 May 29
3
[PATCH 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Wrote the documentation below. I think it would be good to push the doc to the wiki as soon as the UFS support gets merged. Unix Fast File System (UFS/FFS) 1/2 on Syslinux - (usage/install) ----- There is a confusion about the name of this file system, then I decided to contact the author who replied: "The name has always been
2014 May 29
3
[PATCH v2 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Change since v1: * Fix bug on dentry structure (thank you specification; btw, sarcasm), and consequently a bug on ufs_readdir. * Add readlink support (applied tests for symlinks whose destionation path were stored in blk pointers and the file itself). * Several improvements. Wrote the documentation below. I think it would be good to
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...trfs_install_file(path, devfd, rst); + else if (fs_type == XFS) + return xfs_install_file(path, devfd, rst); + + return 1; } #ifdef __KLIBC__ @@ -847,14 +987,22 @@ static const char *find_device(const char *mtab_file, dev_t dev) } break; + case XFS: + if (!strcmp(mnt->mnt_type, "xfs") && !stat(mnt->mnt_fsname, &dst) && + dst.st_rdev == dev) { + done = true; + break; + } case NONE: break; } + if (done) { devname = strdup(mnt->mnt_fsname); break; } } + endmntent(mtab); return devname; @@...