Displaying 3 results from an estimated 3 matches for "st_rdonly".
Did you mean:
o_rdonly
2015 Jan 29
3
[PATCH 1/2] sparsify: ignore read-only btrfs snapshots (RHBZ#1079625)
In copy mode, make sure to not zero-free-space read-only btrfs
snapshots, as we cannot write to them.
---
sparsify/copying.ml | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/sparsify/copying.ml b/sparsify/copying.ml
index 8d77964..4c23939 100644
--- a/sparsify/copying.ml
+++ b/sparsify/copying.ml
@@ -208,6 +208,11 @@ You can ignore this warning or
2006 Aug 17
0
[RFC] proposed extensions for SFTP
....70
diff -u -r1.70 sftp-server.c
--- sftp-server.c 3 Aug 2006 03:34:42 -0000 1.70
+++ sftp-server.c 17 Aug 2006 22:43:04 -0000
@@ -462,6 +463,35 @@
buffer_free(&msg);
}
+static void
+send_statvfs(u_int32_t id, struct statvfs *st)
+{
+ Buffer msg;
+ int flag = 0;
+
+ if (st->f_flag & ST_RDONLY)
+ flag |= SSH2_FX_ST_RDONLY;
+ if (st->f_flag & ST_NOSUID)
+ flag |= SSH2_FX_ST_NOSUID;
+
+ buffer_init(&msg);
+ buffer_put_char(&msg, SSH2_FXP_EXTENDED_REPLY);
+ buffer_put_int(&msg, id);
+ buffer_put_int(&msg, st->f_bsize);
+ buffer_put_int(&msg, st->f_frsize);...
2015 Jan 29
0
[PATCH 2/2] sparsify: ignore read-only devices
...--- a/sparsify/copying.ml
+++ b/sparsify/copying.ml
@@ -233,6 +233,13 @@ You can ignore this warning or change it to a hard failure using the
with Not_found -> false
in
+ let is_readonly_device mp =
+ let statvfs = g#statvfs mp in
+ let flags = statvfs.G.flag in
+ (* 0x01 is ST_RDONLY in Linux' GNU libc. *)
+ flags <> -1_L && (flags &^ 0x1_L) <> 0_L
+ in
+
List.iter (
fun fs ->
if not (is_ignored fs) then (
@@ -250,6 +257,9 @@ You can ignore this warning or change it to a hard failure using the
if is_readonly_btrfs_s...