Displaying 17 results from an estimated 17 matches for "find_device".
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix memory leak
...| 48 ++++++++++++++++++++++++++++++++----------------
1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/extlinux/main.c b/extlinux/main.c
index 55a1495..7bb7443 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -1044,12 +1044,12 @@ err:
}
#ifndef __KLIBC__
-static const char *find_device(const char *mtab_file, dev_t dev)
+static char *find_device(const char *mtab_file, dev_t dev)
{
struct mntent *mnt;
struct stat dst;
FILE *mtab;
- const char *devname = NULL;
+ char *devname = NULL;
bool done;
mtab = setmntent(mtab_file, "r");
@@ -1131,7...
2015 Sep 10
2
[PATCH v2 1/1] extlinux: fix memory leak
...n.c | 44 ++++++++++++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 14 deletions(-)
diff --git a/extlinux/main.c b/extlinux/main.c
index 55a1495..b7cdf92 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -1044,12 +1044,12 @@ err:
}
#ifndef __KLIBC__
-static const char *find_device(const char *mtab_file, dev_t dev)
+static char *find_device(const char *mtab_file, dev_t dev)
{
struct mntent *mnt;
struct stat dst;
FILE *mtab;
- const char *devname = NULL;
+ char *devname = NULL;
bool done;
mtab = setmntent(mtab_file, "r");
@@ -1131,7...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...octl_search_key *sk = &args.key;
struct btrfs_ioctl_search_header *sh;
int ret, i;
- int fd;
+ int fd = -1;
struct btrfs_root_ref *ref;
struct btrfs_dir_item *dir_item;
unsigned long off = 0;
@@ -1044,12 +1044,12 @@ err:
}
#ifndef __KLIBC__
-static const char *find_device(const char *mtab_file, dev_t dev)
+static char *find_device(const char *mtab_file, dev_t dev)
{
struct mntent *mnt;
struct stat dst;
FILE *mtab;
- const char *devname = NULL;
+ char *devname = NULL;
bool done;
mtab = setmntent(mtab_file, "r");
@@ -1131,7...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...sk->min_type = BTRFS_ROOT_BACKREF_KEY;
+ sk->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;...
2015 Sep 11
0
[PATCH v2 1/1] extlinux: fix memory leak
...gt; 1 file changed, 30 insertions(+), 14 deletions(-)
>
> diff --git a/extlinux/main.c b/extlinux/main.c
> index 55a1495..b7cdf92 100644
> --- a/extlinux/main.c
> +++ b/extlinux/main.c
> @@ -1044,12 +1044,12 @@ err:
> }
>
> #ifndef __KLIBC__
> -static const char *find_device(const char *mtab_file, dev_t dev)
> +static char *find_device(const char *mtab_file, dev_t dev)
> {
> struct mntent *mnt;
> struct stat dst;
> FILE *mtab;
> - const char *devname = NULL;
> + char *devname = NULL;
> bool done;
>
> mtab...
2013 Apr 24
7
[PATCH] hotplug/Linux: add iscsi block hotplug script
..."multipath valid values are y and n, $multipath not a valid value"
+ return 1
+ fi
+ return 0
+}
+
+# Outputs the block device major:minor
+device_major_minor()
+{
+ stat -L -c %t:%T "$1"
+}
+
+# Sets $dev to point to the device associated with the value in iqn
+find_device()
+{
+ while [ ! -e /dev/disk/by-path/*"$iqn"-lun-0 ]; do
+ sleep 0.1
+ done
+ set +e
+ sddev=$(readlink -f /dev/disk/by-path/*"$iqn"-lun-0)
+ set -e
+ if [ ! -b "$sddev" ]; then
+ echo "Unable to find attached device path"
+...
2009 Oct 06
0
[PATCH server] new host networking wui
..., :action => 'edit_bonding'%>/" + $('#bonding_id').val());
- $("#host_network_footer").hide();
- }else{
- reset_nics_bonding_detail();
+
+ // find a device from a div id, searches devices array
+ // for device type/id pulled from the div id
+ function find_device(div_id){
+ device_type = device_type_from_div_id(div_id);
+ device_id = device_id_from_div_id(div_id);
+
+ for(j = 0; j < devices.length; ++j){
+ if(devices[j].type == device_type &&
+ devices[j].id == device_id){
+ return devices[j];
+ }
+...
2013 Jul 19
0
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...3,7 +1003,7 @@ static int validate_device(const char *path, int devfd)
> struct statfs sfs;
> int 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) {
> + d...
2014 Dec 08
0
BTRFS default subvolume identification and use
...th the prebuilt binary from kernel.org which
failed to identify that I had set a non 0 value via `btrfs subvolume
set-default <id> <path>`. In extlinux/main.c there appears to be two
different unique attempts to grab information relating to default
subvolume. If the first one succeeds, `find_device_btrfs(path)`, the
second is not ran, `find_device`, which in turn would call
`get_default_subvol`.
I found by commenting out line 1293 of extlinux/main.c that since it
skips `find_device_btrfs(path)` the subvolume is set properly and I can
continue to boot from subvolume and rely on set-default to...
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...rn xfs_install_file(path, devfd, rst);
@@ -983,7 +1003,7 @@ static int validate_device(const char *path, int devfd)
struct statfs sfs;
int 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;
cas...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...then
+ echo "$0: guestfish command failed, see previous error messages"
+ exit 1
+ fi
+}
+
+function fail ()
+{
+ echo "$0: Test $1 failed. Command line output was:"
+ cat "$DEBUG_QEMU_FILE"
+ exit 1
+}
+
+# arg1 - is device number
+function find_device()
+{
+ grep -shoe "-device \S*drive=hd${1}\S*" "$DEBUG_QEMU_FILE"
+}
+
+# arg1 - is device number
+# arg2 - is expected blocksize
+function check_blocksize_for_device()
+{
+ find_device ${1} | grep -sqEe "((physical|logical)_block_size=${2},?){2}" || fail hd${1}...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...then
+ echo "$0: guestfish command failed, see previous error messages"
+ exit 1
+ fi
+}
+
+function fail ()
+{
+ echo "$0: Test $1 failed. Command line output was:"
+ cat "$DEBUG_QEMU_FILE"
+ exit 1
+}
+
+# arg1 - is device number
+function find_device()
+{
+ grep -shoe "-device \S*drive=hd${1}\S*" "$DEBUG_QEMU_FILE"
+}
+
+# arg1 - is device number
+# arg2 - is expected blocksize
+function check_blocksize_for_device()
+{
+ find_device ${1} | grep -sqEe "((physical|logical)_block_size=${2},?){2}" || fail hd${1}...
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...rn xfs_install_file(path, devfd, rst);
@@ -983,7 +1008,7 @@ static int validate_device(const char *path, int devfd)
struct statfs sfs;
int 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:...
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
..._type == NTFS)
+ return ext2_fat_install_file(path, devfd, rst);
+ else if (fs_type == BTRFS)
+ return btrfs_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...
2006 Jul 26
5
linux-2.6-xen.hg
Hi,
Is the http://xenbits.xensource.com/linux-2.6-xen.hg tree still being
updated? if not, what''s the preferred Linux tree to track that has all
of the Xen bits?
Thanks,
Muli
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel