search for: tune2fs_l

Displaying 19 results from an estimated 19 matches for "tune2fs_l".

Did you mean: tune2fs
2013 Apr 03
1
RHashtable and the python bindings
...ashtable are currently returned as a list of tuples in the python bindings rather than the obvious dict. I propose fixing this, whilst also maintaining API compatibility for a period of time. The following apis return RHashtable: inspect_get_mountpoints list_filesystems inspect_get_drive_mappings tune2fs_l mountpoints md_detail blkid list_disk_labels I propose the following: h = guestfs.GuestFS(return_dict=True) If return_dict is set, any RHashtable api would return a dict rather than a list of tuples. If not, the behaviour would be unchanged. The default would be False. We would advertise immedi...
2011 Nov 10
5
[PATCH v2] Add tune2fs command.
The changes since the previous patch: - safe ADD_ARG macro for adding arguments to a fixed size stack array - support for testing functions that return RHashtable, ie. tune2fs-l. - add tests that set (tune2fs) and get (tune2fs-l) various parameters. - only one 'intervalbetweenchecks' parameter (in seconds) Rich.
2015 Oct 19
1
Re: [PATCH 2/2] Include resize2fs_P into vfs_min_size.
...device) > return 0; > } > > +static int32_t > +get_block_size (const char *device) > +{ > + CLEANUP_FREE_STRING_LIST char **params = NULL; > + const char *block_pattern = "Block size"; > + size_t i; > + int32_t block_size; > + > + params = do_tune2fs_l (device); This works, yes, although maybe there should be a way to run tune2fs -l and traverse its output to either build a return hash (i.e. what do_tune2fs_l currently does) or just lookup one or more keys (like needed here). > + if (params == NULL) > + return -1; > + > + for (...
2015 Mar 03
2
[PATCH] actions: improve man page links
...be a file or directory in the mounted file system (typically it is the mount point itself, but it doesn't need to be). -This is the same as the C<statvfs(2)> system call." }; +This is the same as the L<statvfs(2)> system call." }; { defaults with name = "tune2fs_l"; @@ -7640,10 +7640,10 @@ On return you get a list of strings, with a one-to-one correspondence to the C<names> list. Each string is the value of the symbolic link. -If the C<readlink(2)> operation fails on any name, then +If the L<readlink(2)> operation fails on any nam...
2015 Oct 19
5
[PATCHv2 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 45 ++++++++++++++++++++++++++----- daemon/fs-min-size.c | 49
2015 Oct 19
0
[PATCH 2/2] Include resize2fs_P into vfs_min_size.
...mon/ext2.c @@ -279,8 +279,34 @@ do_resize2fs_M (const char *device) return 0; } +static int32_t +get_block_size (const char *device) +{ + CLEANUP_FREE_STRING_LIST char **params = NULL; + const char *block_pattern = "Block size"; + size_t i; + int32_t block_size; + + params = do_tune2fs_l (device); + if (params == NULL) + return -1; + + for (i = 0; params[i] != NULL; i += 2) { + if ((!strcmp (params[i], block_pattern))) { + if (sscanf (params[i + 1], "%" SCNd32, &block_size) != 1) { + reply_with_error("Cannot parse block size"); + r...
2015 Oct 20
0
[PATCHv3 2/2] Include resize2fs_P into vfs_min_size.
...ne MAX_ARGS 128 @@ -279,15 +280,41 @@ do_resize2fs_M (const char *device) return 0; } +static long +get_block_size (const char *device) +{ + CLEANUP_FREE_STRING_LIST char **params = NULL; + const char *block_pattern = "Block size"; + size_t i; + long block_size; + + params = do_tune2fs_l (device); + if (params == NULL) + return -1; + + for (i = 0; params[i] != NULL; i += 2) { + if (STREQ (params[i], block_pattern)) { + if (xstrtol (params[i + 1], NULL, 10, &block_size, NULL) != LONGINT_OK) { + reply_with_error ("Cannot parse block size"); +...
2015 Oct 20
4
[PATCHv3 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 +
2015 Oct 20
8
[PATCHv4 0/2] Introduce vfs_minimum_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Difference to v3: Decapitalize error messages. Maxim Perevedentsev (2): New API: vfs_minimum_size Include resize2fs_P into
2017 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
2012 Jan 12
1
Libguestfs gobject bindings
I'm currently working on gobject bindings for libguestfs. I haven't got as far as compiling anything yet, but I've attached the C header for initial review. Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490 -------------- next part -------------- An embedded and
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally useful to any binding which uses camel case by requirement or convention. --- generator/generator_haskell.ml | 4 ++-- generator/generator_java.ml | 10 +++++----- generator/generator_main.ml | 2 +- generator/generator_structs.ml | 12 +++++------- generator/generator_structs.mli | 8 ++++---- 5
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in: https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html Rich.
2012 Jan 20
11
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
...ame "Tune2FS"], [InitScratchFS, Always, TestOutputHashtable ( [["tune2fs"; "/dev/sdb1"; "false"; "0"; ""; "NOARG"; ""; "0"; ""; "NOARG"; ""; ""]; ["tune2fs_l"; "/dev/sdb1"]], @@ -6476,7 +6476,7 @@ To get the current values of filesystem parameters, see C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the L<tune2fs(8)> man page."); - ("md_create", (RErr, [String "name"; DeviceLi...
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files. Rich.
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...name, "path")], []; tests = [ InitISOFS, Always, TestResult ( [["statvfs"; "/"]], "ret->namemax == 255"), [] @@ -2551,7 +2551,7 @@ This is the same as the L<statvfs(2)> system call." }; { defaults with name = "tune2fs_l"; added = (1, 9, 2); - style = RHashtable "superblock", [Device "device"], []; + style = RHashtable "superblock", [String (Device, "device")], []; tests = [ InitScratchFS, Always, TestResult ( [["tune2fs_l"; "/de...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.