Displaying 20 results from an estimated 28 matches for "do_vfs_type".
2015 Jan 14
2
[PATCH] daemon: use btrfs(1) to get btrfs labels
...s(+)
diff --git a/daemon/blkid.c b/daemon/blkid.c
index b98c155..2c9e2f1 100644
--- a/daemon/blkid.c
+++ b/daemon/blkid.c
@@ -26,6 +26,7 @@
#include "daemon.h"
#include "actions.h"
+#include "optgroups.h"
GUESTFSD_EXT_CMD(str_blkid, blkid);
@@ -76,6 +77,11 @@ do_vfs_type (const mountable_t *mountable)
char *
do_vfs_label (const mountable_t *mountable)
{
+ CLEANUP_FREE char *type = do_vfs_type (mountable);
+
+ if (type && STREQ (type, "btrfs") && optgroup_btrfs_available ())
+ return btrfs_get_label (mountable->device);
+
retu...
2015 Jan 15
0
[PATCH 1/2] daemon: use btrfs(1) to get btrfs labels
...s(+)
diff --git a/daemon/blkid.c b/daemon/blkid.c
index b98c155..e8e7b58 100644
--- a/daemon/blkid.c
+++ b/daemon/blkid.c
@@ -26,6 +26,7 @@
#include "daemon.h"
#include "actions.h"
+#include "optgroups.h"
GUESTFSD_EXT_CMD(str_blkid, blkid);
@@ -76,6 +77,13 @@ do_vfs_type (const mountable_t *mountable)
char *
do_vfs_label (const mountable_t *mountable)
{
+ CLEANUP_FREE char *type = do_vfs_type (mountable);
+
+ if (type) {
+ if (STREQ (type, "btrfs") && optgroup_btrfs_available ())
+ return btrfs_get_label (mountable->device);
+ }
+...
2017 Jul 14
0
[PATCH 04/27] daemon: Reimplement ‘vfs_type’ API in OCaml.
...oot.ml \
+ mountable.ml \
chroot.ml \
+ blkid.ml \
file.ml \
callbacks.ml \
daemon.ml
diff --git a/daemon/blkid.c b/daemon/blkid.c
index 1fe5ff93a..7757b5ad0 100644
--- a/daemon/blkid.c
+++ b/daemon/blkid.c
@@ -69,12 +69,6 @@ get_blkid_tag (const char *device, const char *tag)
}
char *
-do_vfs_type (const mountable_t *mountable)
-{
- return get_blkid_tag (mountable->device, "TYPE");
-}
-
-char *
do_vfs_label (const mountable_t *mountable)
{
CLEANUP_FREE char *type = do_vfs_type (mountable);
diff --git a/daemon/blkid.ml b/daemon/blkid.ml
new file mode 100644
index 000000000....
2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...;device not mounted: %s", device);
+ return NULL;
+}
+
int64_t
do_vfs_minimum_size (const mountable_t *mountable)
{
int64_t r;
- /* How we set the label depends on the filesystem type. */
+ /* How we get minimum size depends on the filesystem type. */
CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
if (vfs_type == NULL)
return -1;
@@ -41,6 +66,13 @@ do_vfs_minimum_size (const mountable_t *mountable)
else if (STREQ (vfs_type, "ntfs"))
r = ntfs_minimum_size (mountable->device);
+ else if (STREQ (vfs_type, "btrfs")) {
+ CLEANUP_FREE char *...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...;device not mounted: %s", device);
+ return NULL;
+}
+
int64_t
do_vfs_minimum_size (const mountable_t *mountable)
{
int64_t r;
- /* How we set the label depends on the filesystem type. */
+ /* How we get minimum size depends on the filesystem type. */
CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
if (vfs_type == NULL)
return -1;
@@ -41,6 +82,13 @@ do_vfs_minimum_size (const mountable_t *mountable)
else if (STREQ (vfs_type, "ntfs"))
r = ntfs_minimum_size (mountable->device);
+ else if (STREQ (vfs_type, "btrfs")) {
+ CLEANUP_FREE char *...
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...NULL;
> +}
> +
> int64_t
> do_vfs_minimum_size (const mountable_t *mountable)
> {
> int64_t r;
>
> - /* How we set the label depends on the filesystem type. */
> + /* How we get minimum size depends on the filesystem type. */
> CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
> if (vfs_type == NULL)
> return -1;
> @@ -41,6 +82,13 @@ do_vfs_minimum_size (const mountable_t *mountable)
> else if (STREQ (vfs_type, "ntfs"))
> r = ntfs_minimum_size (mountable->device);
>
> + else if (STREQ (vfs_type, "btrfs...
2015 Oct 23
1
[PATCHv2] Added btrfs support for vfs_min_size.
...;device not mounted: %s", device);
+ return NULL;
+}
+
int64_t
do_vfs_minimum_size (const mountable_t *mountable)
{
int64_t r;
- /* How we set the label depends on the filesystem type. */
+ /* How we get minimum size depends on the filesystem type. */
CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
if (vfs_type == NULL)
return -1;
@@ -41,6 +57,13 @@ do_vfs_minimum_size (const mountable_t *mountable)
else if (STREQ (vfs_type, "ntfs"))
r = ntfs_minimum_size (mountable->device);
+ else if (STREQ (vfs_type, "btrfs")) {
+ CLEANUP_FREE char *...
2015 Oct 16
0
[PATCH 1/2] New API: get_min_size
...io.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "daemon.h"
+#include "actions.h"
+
+int64_t
+do_get_min_size(const mountable_t *mountable)
+{
+ int64_t r;
+
+ /* How we set the label depends on the filesystem type. */
+ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
+ if (vfs_type == NULL)
+ return -1;
+
+ else if (STREQ (vfs_type, "ntfs"))
+ r = ntfs_get_min_size (mountable->device);
+
+ else
+ NOT_SUPPORTED (-1, "don't know how to get minimum size of '%s' filesystems",
+ vfs_type);...
2015 Oct 19
0
[PATCH 1/2] New API: vfs_min_size
...io.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "daemon.h"
+#include "actions.h"
+
+int64_t
+do_vfs_min_size(const mountable_t *mountable)
+{
+ int64_t r;
+
+ /* How we set the label depends on the filesystem type. */
+ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
+ if (vfs_type == NULL)
+ return -1;
+
+ else if (STREQ (vfs_type, "ntfs"))
+ r = ntfs_min_size (mountable->device);
+
+ else
+ NOT_SUPPORTED (-1, "don't know how to get minimum size of '%s' filesystems",
+ vfs_type);
+
+...
2015 Oct 20
0
[PATCHv3 1/2] New API: vfs_min_size
...gt;
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "daemon.h"
+#include "actions.h"
+
+int64_t
+do_vfs_minimum_size (const mountable_t *mountable)
+{
+ int64_t r;
+
+ /* How we set the label depends on the filesystem type. */
+ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
+ if (vfs_type == NULL)
+ return -1;
+
+ else if (STREQ (vfs_type, "ntfs"))
+ r = ntfs_minimum_size (mountable->device);
+
+ else
+ NOT_SUPPORTED (-1, "don't know how to get minimum size of '%s' filesystems",
+ vfs_type);...
2015 Oct 20
0
[PATCHv4 1/2] New API: vfs_minimum_size
...gt;
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "daemon.h"
+#include "actions.h"
+
+int64_t
+do_vfs_minimum_size (const mountable_t *mountable)
+{
+ int64_t r;
+
+ /* How we set the label depends on the filesystem type. */
+ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
+ if (vfs_type == NULL)
+ return -1;
+
+ else if (STREQ (vfs_type, "ntfs"))
+ r = ntfs_minimum_size (mountable->device);
+
+ else
+ NOT_SUPPORTED (-1, "don't know how to get minimum size of '%s' filesystems",
+ vfs_type);...
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but
don't update apis which must return mountables.
Matt
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 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 16
4
[PATCH 0/2] Introduce get_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments.
Maybe you can suggest a better name for API?
Maxim Perevedentsev (2):
New API: get_min_size
Include resize2fs_P into get_min_size.
daemon/Makefile.am | 1 +
daemon/daemon.h | 2 ++
daemon/ext2.c | 37 ++++++++++++++++++++++++----
daemon/fs-min-size.c | 49 +++++++++++++++++++++++++++++++++++++
daemon/ntfs.c | 68
2015 Oct 19
5
Re: [PATCH 1/2] New API: vfs_min_size
...on like
"vfs_minimum_size".
(also a minor style nitpick: missing space between function name and
the bracket, and in other few places in this patch)
> +{
> + int64_t r;
> +
> + /* How we set the label depends on the filesystem type. */
> + CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
> + if (vfs_type == NULL)
> + return -1;
> +
> + else if (STREQ (vfs_type, "ntfs"))
> + r = ntfs_min_size (mountable->device);
> +
> + else
> + NOT_SUPPORTED (-1, "don't know how to get minimum size of '%s' filesystems&q...
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
2012 Feb 27
4
[PATCH 0/4] Add various ntfs* tools and unify label setting.
This miscellaneous patch adds bindings for:
- ntfsfix
- ntfsclone
- ntfslabel
and unifies filesystem label setting through a single API 'set-label'
which replaces 'set-e2label' and is also able to set labels on NTFS
using the ntfslabel program.
'ntfsfix' has been added as a possible way to fix RHBZ#797760.
However I have not found a way to fully fix this bug. See
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device.
---
generator/bindtests.ml | 2 +-
generator/c.ml | 7 +++++--
generator/csharp.ml | 6 ++++--
generator/daemon.ml | 4 ++--
generator/erlang.ml | 6 +++---
generator/fish.ml | 8 ++++----
generator/gobject.ml | 11 ++++++-----
generator/haskell.ml | 11 +++++++----
generator/java.ml | 10 +++++-----
2017 Jun 03
12
[PATCH v2 00/12] Allow APIs to be implemented in OCaml.
Version 1 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00003.html
This patch series reimplements a few more APIs in OCaml, including
some very important core APIs like ?list_filesystems? and ?mount?.
All the tests pass after this.
The selection of APIs that I have moved may look a little random, but
in fact they are all APIs consumed by the inspection code (and some
more