summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-03-12 16:23:46 +0000
committerRichard Jones <rjones@redhat.com>2010-03-12 16:23:46 +0000
commit369872b91ed50e2803dc2837183258776e9868e0 (patch)
treec408ee97f225e966dbd98e31eaa13e20b177f12c
parentffa3af3b5dd234012f9f4b9c28d483ff371f0ecc (diff)
downloadlibguestfs-369872b91ed50e2803dc2837183258776e9868e0.tar.gz
libguestfs-369872b91ed50e2803dc2837183258776e9868e0.tar.xz
libguestfs-369872b91ed50e2803dc2837183258776e9868e0.zip
Tab to space (whitespace fixes only).
-rwxr-xr-xappliance/supermin-split.sh.in4
-rwxr-xr-xcontrib/guestfsd-in-wine.sh4
-rw-r--r--daemon/sync.c2
-rwxr-xr-xsrc/generator.ml164
-rwxr-xr-xtools/virt-list-filesystems34
5 files changed, 104 insertions, 104 deletions
diff --git a/appliance/supermin-split.sh.in b/appliance/supermin-split.sh.in
index 94990dd7..edb6c41b 100755
--- a/appliance/supermin-split.sh.in
+++ b/appliance/supermin-split.sh.in
@@ -107,8 +107,8 @@ for path in $(find -not -name fakeroot.log); do
# Special case for libntfs-3g.so.*
elif [[ "$file" =~ $p_libntfs3g ]]; then
- [ -n "$libntfs3g_once" ] || echo "$dir/libntfs-3g.so.*" >&6
- libntfs3g_once=1
+ [ -n "$libntfs3g_once" ] || echo "$dir/libntfs-3g.so.*" >&6
+ libntfs3g_once=1
# libfoo-1.2.3.so
elif [[ "$file" =~ $p_lib123so ]]; then
diff --git a/contrib/guestfsd-in-wine.sh b/contrib/guestfsd-in-wine.sh
index aa5b4823..85146eb2 100755
--- a/contrib/guestfsd-in-wine.sh
+++ b/contrib/guestfsd-in-wine.sh
@@ -97,8 +97,8 @@ fi
append=
while [ $# -gt 0 ]; do
if [ $1 = "-append" ]; then
- append="$2"
- shift
+ append="$2"
+ shift
fi
shift
done
diff --git a/daemon/sync.c b/daemon/sync.c
index 37e8faab..b848ab54 100644
--- a/daemon/sync.c
+++ b/daemon/sync.c
@@ -97,7 +97,7 @@ sync_win32 (void)
*/
TCHAR volname[50];
if (!GetVolumeNameForVolumeMountPoint (p, volname, 50))
- return -1;
+ return -1;
drive = CreateFile (volname, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
diff --git a/src/generator.ml b/src/generator.ml
index fab2173d..486b9d88 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -19,17 +19,17 @@
(* This script generates a large amount of code and documentation for
* all the daemon actions.
- *
+ *
* To add a new action there are only two files you need to change,
* this one to describe the interface (see the big table of
* 'daemon_functions' below), and daemon/<somefile>.c to write the
* implementation.
- *
+ *
* After editing this file, run it (./src/generator.ml) to regenerate
* all the output files. 'make' will rerun this automatically when
* necessary. Note that if you are using a separate build directory
* you must run generator.ml from the _source_ directory.
- *
+ *
* IMPORTANT: This script should NOT print any warnings. If it prints
* warnings, you should treat them as errors.
*
@@ -6818,7 +6818,7 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd =
| Bool _, _
| FileIn _, _ | FileOut _, _ -> ()
| StringList n, "" | DeviceList n, "" ->
- pr " const char *const %s[1] = { NULL };\n" n
+ pr " const char *const %s[1] = { NULL };\n" n
| StringList n, arg | DeviceList n, arg ->
let strs = string_split " " arg in
iteri (
@@ -10223,96 +10223,96 @@ namespace Guestfs
List.iter (
fun (name, style, _, _, _, shortdesc, _) ->
let rec csharp_return_type () =
- match fst style with
- | RErr -> "void"
- | RBool n -> "bool"
- | RInt n -> "int"
- | RInt64 n -> "long"
- | RConstString n
- | RConstOptString n
- | RString n
- | RBufferOut n -> "string"
- | RStruct (_,n) -> "_" ^ n
- | RHashtable n -> "Hashtable"
- | RStringList n -> "string[]"
- | RStructList (_,n) -> sprintf "_%s[]" n
+ match fst style with
+ | RErr -> "void"
+ | RBool n -> "bool"
+ | RInt n -> "int"
+ | RInt64 n -> "long"
+ | RConstString n
+ | RConstOptString n
+ | RString n
+ | RBufferOut n -> "string"
+ | RStruct (_,n) -> "_" ^ n
+ | RHashtable n -> "Hashtable"
+ | RStringList n -> "string[]"
+ | RStructList (_,n) -> sprintf "_%s[]" n
and c_return_type () =
- match fst style with
- | RErr
- | RBool _
- | RInt _ -> "int"
- | RInt64 _ -> "long"
- | RConstString _
- | RConstOptString _
- | RString _
- | RBufferOut _ -> "string"
- | RStruct (_,n) -> "_" ^ n
- | RHashtable _
- | RStringList _ -> "string[]"
- | RStructList (_,n) -> sprintf "_%s[]" n
-
+ match fst style with
+ | RErr
+ | RBool _
+ | RInt _ -> "int"
+ | RInt64 _ -> "long"
+ | RConstString _
+ | RConstOptString _
+ | RString _
+ | RBufferOut _ -> "string"
+ | RStruct (_,n) -> "_" ^ n
+ | RHashtable _
+ | RStringList _ -> "string[]"
+ | RStructList (_,n) -> sprintf "_%s[]" n
+
and c_error_comparison () =
- match fst style with
- | RErr
- | RBool _
- | RInt _
- | RInt64 _ -> "== -1"
- | RConstString _
- | RConstOptString _
- | RString _
- | RBufferOut _
- | RStruct (_,_)
- | RHashtable _
- | RStringList _
- | RStructList (_,_) -> "== null"
-
+ match fst style with
+ | RErr
+ | RBool _
+ | RInt _
+ | RInt64 _ -> "== -1"
+ | RConstString _
+ | RConstOptString _
+ | RString _
+ | RBufferOut _
+ | RStruct (_,_)
+ | RHashtable _
+ | RStringList _
+ | RStructList (_,_) -> "== null"
+
and generate_extern_prototype () =
- pr " static extern %s guestfs_%s (IntPtr h"
- (c_return_type ()) name;
- List.iter (
- function
- | Pathname n | Device n | Dev_or_Path n | String n | OptString n
- | FileIn n | FileOut n ->
+ pr " static extern %s guestfs_%s (IntPtr h"
+ (c_return_type ()) name;
+ List.iter (
+ function
+ | Pathname n | Device n | Dev_or_Path n | String n | OptString n
+ | FileIn n | FileOut n ->
pr ", [In] string %s" n
- | StringList n | DeviceList n ->
+ | StringList n | DeviceList n ->
pr ", [In] string[] %s" n
- | Bool n ->
- pr ", bool %s" n
- | Int n ->
- pr ", int %s" n
- | Int64 n ->
- pr ", long %s" n
- ) (snd style);
- pr ");\n"
+ | Bool n ->
+ pr ", bool %s" n
+ | Int n ->
+ pr ", int %s" n
+ | Int64 n ->
+ pr ", long %s" n
+ ) (snd style);
+ pr ");\n"
and generate_public_prototype () =
- pr " public %s %s (" (csharp_return_type ()) name;
- let comma = ref false in
- let next () =
- if !comma then pr ", ";
- comma := true
- in
- List.iter (
- function
- | Pathname n | Device n | Dev_or_Path n | String n | OptString n
- | FileIn n | FileOut n ->
+ pr " public %s %s (" (csharp_return_type ()) name;
+ let comma = ref false in
+ let next () =
+ if !comma then pr ", ";
+ comma := true
+ in
+ List.iter (
+ function
+ | Pathname n | Device n | Dev_or_Path n | String n | OptString n
+ | FileIn n | FileOut n ->
next (); pr "string %s" n
- | StringList n | DeviceList n ->
+ | StringList n | DeviceList n ->
next (); pr "string[] %s" n
- | Bool n ->
- next (); pr "bool %s" n
- | Int n ->
- next (); pr "int %s" n
- | Int64 n ->
- next (); pr "long %s" n
- ) (snd style);
- pr ")\n"
+ | Bool n ->
+ next (); pr "bool %s" n
+ | Int n ->
+ next (); pr "int %s" n
+ | Int64 n ->
+ next (); pr "long %s" n
+ ) (snd style);
+ pr ")\n"
and generate_call () =
- pr "guestfs_%s (_handle" name;
- List.iter (fun arg -> pr ", %s" (name_of_argt arg)) (snd style);
- pr ");\n";
+ pr "guestfs_%s (_handle" name;
+ List.iter (fun arg -> pr ", %s" (name_of_argt arg)) (snd style);
+ pr ");\n";
in
pr " [DllImport (\"%s\")]\n" library;
diff --git a/tools/virt-list-filesystems b/tools/virt-list-filesystems
index 99480958..0d527457 100755
--- a/tools/virt-list-filesystems
+++ b/tools/virt-list-filesystems
@@ -143,22 +143,22 @@ foreach $dev (@partitions) {
my $mountable = $@ ? 0 : 1;
$g->umount_all ();
if ($mountable) {
- push @fses, $dev;
+ push @fses, $dev;
} else {
- push @not_mountable, $dev;
+ push @not_mountable, $dev;
}
}
foreach $dev (@fses) {
print canonicalize($dev);
if ($long) {
- my $fstype;
- eval { $fstype = $g->vfs_type ($dev); };
- if ($fstype) {
- print " $fstype";
- } else {
- print " unknown";
- }
+ my $fstype;
+ eval { $fstype = $g->vfs_type ($dev); };
+ if ($fstype) {
+ print " $fstype";
+ } else {
+ print " unknown";
+ }
}
print "\n";
}
@@ -166,13 +166,13 @@ foreach $dev (@fses) {
# If asked, look in the not_mountable list for potential swap devices.
if ($all) {
foreach $dev (@not_mountable) {
- my $file;
- eval { $file = $g->file ($dev); };
- if ($file && $file =~ /\bswap\b/) {
- print canonicalize($dev);
- print " swap" if $long;
- print "\n"
- }
+ my $file;
+ eval { $file = $g->file ($dev); };
+ if ($file && $file =~ /\bswap\b/) {
+ print canonicalize($dev);
+ print " swap" if $long;
+ print "\n"
+ }
}
}
@@ -183,7 +183,7 @@ sub canonicalize
local $_ = shift;
if (m{^/dev/[hv]d([a-z]\d)$}) {
- return "/dev/sd$1";
+ return "/dev/sd$1";
}
$_;
}