mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator: Move some deprecated functions to actions_core_deprecated.ml.
Fixes commit 97773d2bbe.
This commit is contained in:
@@ -1594,38 +1594,6 @@ this setting may be any power of two between 512 and 2097152.
|
||||
Note that this call does not add the new disk to the handle. You
|
||||
may need to call C<guestfs_add_drive_opts> separately." };
|
||||
|
||||
{ defaults with
|
||||
name = "stat"; added = (1, 9, 2);
|
||||
style = RStruct ("statbuf", "stat"), [Pathname "path"], [];
|
||||
deprecated_by = Some "statns";
|
||||
tests = [
|
||||
InitISOFS, Always, TestResult (
|
||||
[["stat"; "/empty"]], "ret->size == 0"), []
|
||||
];
|
||||
shortdesc = "get file information";
|
||||
longdesc = "\
|
||||
Returns file information for the given C<path>.
|
||||
|
||||
This is the same as the L<stat(2)> system call." };
|
||||
|
||||
{ defaults with
|
||||
name = "lstat"; added = (1, 9, 2);
|
||||
style = RStruct ("statbuf", "stat"), [Pathname "path"], [];
|
||||
deprecated_by = Some "lstatns";
|
||||
tests = [
|
||||
InitISOFS, Always, TestResult (
|
||||
[["lstat"; "/empty"]], "ret->size == 0"), []
|
||||
];
|
||||
shortdesc = "get file information for a symbolic link";
|
||||
longdesc = "\
|
||||
Returns file information for the given C<path>.
|
||||
|
||||
This is the same as C<guestfs_stat> except that if C<path>
|
||||
is a symbolic link, then the link is stat-ed, not the file it
|
||||
refers to.
|
||||
|
||||
This is the same as the L<lstat(2)> system call." };
|
||||
|
||||
{ defaults with
|
||||
name = "c_pointer"; added = (1, 29, 17);
|
||||
style = RInt64 "ptr", [], [];
|
||||
@@ -2258,28 +2226,6 @@ from the non-empty list of physical volumes C<physvols>." };
|
||||
This creates an LVM logical volume called C<logvol>
|
||||
on the volume group C<volgroup>, with C<size> megabytes." };
|
||||
|
||||
{ defaults with
|
||||
name = "write_file"; added = (0, 0, 8);
|
||||
style = RErr, [Pathname "path"; String "content"; Int "size"], [];
|
||||
protocol_limit_warning = true; deprecated_by = Some "write";
|
||||
(* Regression test for RHBZ#597135. *)
|
||||
tests = [
|
||||
InitScratchFS, Always, TestLastFail
|
||||
[["write_file"; "/write_file"; "abc"; "10000"]], []
|
||||
];
|
||||
shortdesc = "create a file";
|
||||
longdesc = "\
|
||||
This call creates a file called C<path>. The contents of the
|
||||
file is the string C<content> (which can contain any 8 bit data),
|
||||
with length C<size>.
|
||||
|
||||
As a special case, if C<size> is C<0>
|
||||
then the length is calculated using C<strlen> (so in this case
|
||||
the content cannot contain embedded ASCII NULs).
|
||||
|
||||
I<NB.> Owing to a bug, writing content containing ASCII NUL
|
||||
characters does I<not> work, even if the length is specified." };
|
||||
|
||||
{ defaults with
|
||||
name = "umount"; added = (0, 0, 8);
|
||||
style = RErr, [Dev_or_Path "pathordevice"], [OBool "force"; OBool "lazyunmount"];
|
||||
@@ -5478,26 +5424,6 @@ calls to associate logical volumes and volume groups.
|
||||
|
||||
See also C<guestfs_vgpvuuids>." };
|
||||
|
||||
{ defaults with
|
||||
name = "copy_size"; added = (1, 0, 87);
|
||||
style = RErr, [Dev_or_Path "src"; Dev_or_Path "dest"; Int64 "size"], [];
|
||||
progress = true; deprecated_by = Some "copy_device_to_device";
|
||||
tests = [
|
||||
InitScratchFS, Always, TestResult (
|
||||
[["mkdir"; "/copy_size"];
|
||||
["write"; "/copy_size/src"; "hello, world"];
|
||||
["copy_size"; "/copy_size/src"; "/copy_size/dest"; "5"];
|
||||
["read_file"; "/copy_size/dest"]],
|
||||
"compare_buffers (ret, size, \"hello\", 5) == 0"), []
|
||||
];
|
||||
shortdesc = "copy size bytes from source to destination using dd";
|
||||
longdesc = "\
|
||||
This command copies exactly C<size> bytes from one source device
|
||||
or file C<src> to another destination device or file C<dest>.
|
||||
|
||||
Note this will fail if the source is too short or if the destination
|
||||
is not large enough." };
|
||||
|
||||
{ defaults with
|
||||
name = "zero_device"; added = (1, 3, 1);
|
||||
style = RErr, [Device "device"], [];
|
||||
@@ -5782,15 +5708,6 @@ See also L<guestfs(3)/RESIZE2FS ERRORS>." };
|
||||
shortdesc = "resize an LVM physical volume (with size)";
|
||||
longdesc = "\
|
||||
This command is the same as C<guestfs_pvresize> except that it
|
||||
allows you to specify the new size (in bytes) explicitly." };
|
||||
|
||||
{ defaults with
|
||||
name = "ntfsresize_size"; added = (1, 3, 14);
|
||||
style = RErr, [Device "device"; Int64 "size"], [];
|
||||
optional = Some "ntfsprogs"; deprecated_by = Some "ntfsresize";
|
||||
shortdesc = "resize an NTFS filesystem (with size)";
|
||||
longdesc = "\
|
||||
This command is the same as C<guestfs_ntfsresize> except that it
|
||||
allows you to specify the new size (in bytes) explicitly." };
|
||||
|
||||
{ defaults with
|
||||
|
||||
@@ -105,6 +105,38 @@ list a directory contents without making many round-trips.
|
||||
See also C<guestfs_lxattrlist> for a similarly efficient call
|
||||
for getting extended attributes." };
|
||||
|
||||
{ defaults with
|
||||
name = "stat"; added = (1, 9, 2);
|
||||
style = RStruct ("statbuf", "stat"), [Pathname "path"], [];
|
||||
deprecated_by = Some "statns";
|
||||
tests = [
|
||||
InitISOFS, Always, TestResult (
|
||||
[["stat"; "/empty"]], "ret->size == 0"), []
|
||||
];
|
||||
shortdesc = "get file information";
|
||||
longdesc = "\
|
||||
Returns file information for the given C<path>.
|
||||
|
||||
This is the same as the L<stat(2)> system call." };
|
||||
|
||||
{ defaults with
|
||||
name = "lstat"; added = (1, 9, 2);
|
||||
style = RStruct ("statbuf", "stat"), [Pathname "path"], [];
|
||||
deprecated_by = Some "lstatns";
|
||||
tests = [
|
||||
InitISOFS, Always, TestResult (
|
||||
[["lstat"; "/empty"]], "ret->size == 0"), []
|
||||
];
|
||||
shortdesc = "get file information for a symbolic link";
|
||||
longdesc = "\
|
||||
Returns file information for the given C<path>.
|
||||
|
||||
This is the same as C<guestfs_stat> except that if C<path>
|
||||
is a symbolic link, then the link is stat-ed, not the file it
|
||||
refers to.
|
||||
|
||||
This is the same as the L<lstat(2)> system call." };
|
||||
|
||||
]
|
||||
|
||||
let daemon_functions = [
|
||||
@@ -751,4 +783,55 @@ List the files in F<directory> in the format of 'ls -laZ'.
|
||||
This command is mostly useful for interactive sessions. It
|
||||
is I<not> intended that you try to parse the output string." };
|
||||
|
||||
{ defaults with
|
||||
name = "write_file"; added = (0, 0, 8);
|
||||
style = RErr, [Pathname "path"; String "content"; Int "size"], [];
|
||||
protocol_limit_warning = true; deprecated_by = Some "write";
|
||||
(* Regression test for RHBZ#597135. *)
|
||||
tests = [
|
||||
InitScratchFS, Always, TestLastFail
|
||||
[["write_file"; "/write_file"; "abc"; "10000"]], []
|
||||
];
|
||||
shortdesc = "create a file";
|
||||
longdesc = "\
|
||||
This call creates a file called C<path>. The contents of the
|
||||
file is the string C<content> (which can contain any 8 bit data),
|
||||
with length C<size>.
|
||||
|
||||
As a special case, if C<size> is C<0>
|
||||
then the length is calculated using C<strlen> (so in this case
|
||||
the content cannot contain embedded ASCII NULs).
|
||||
|
||||
I<NB.> Owing to a bug, writing content containing ASCII NUL
|
||||
characters does I<not> work, even if the length is specified." };
|
||||
|
||||
{ defaults with
|
||||
name = "copy_size"; added = (1, 0, 87);
|
||||
style = RErr, [Dev_or_Path "src"; Dev_or_Path "dest"; Int64 "size"], [];
|
||||
progress = true; deprecated_by = Some "copy_device_to_device";
|
||||
tests = [
|
||||
InitScratchFS, Always, TestResult (
|
||||
[["mkdir"; "/copy_size"];
|
||||
["write"; "/copy_size/src"; "hello, world"];
|
||||
["copy_size"; "/copy_size/src"; "/copy_size/dest"; "5"];
|
||||
["read_file"; "/copy_size/dest"]],
|
||||
"compare_buffers (ret, size, \"hello\", 5) == 0"), []
|
||||
];
|
||||
shortdesc = "copy size bytes from source to destination using dd";
|
||||
longdesc = "\
|
||||
This command copies exactly C<size> bytes from one source device
|
||||
or file C<src> to another destination device or file C<dest>.
|
||||
|
||||
Note this will fail if the source is too short or if the destination
|
||||
is not large enough." };
|
||||
|
||||
{ defaults with
|
||||
name = "ntfsresize_size"; added = (1, 3, 14);
|
||||
style = RErr, [Device "device"; Int64 "size"], [];
|
||||
optional = Some "ntfsprogs"; deprecated_by = Some "ntfsresize";
|
||||
shortdesc = "resize an NTFS filesystem (with size)";
|
||||
longdesc = "\
|
||||
This command is the same as C<guestfs_ntfsresize> except that it
|
||||
allows you to specify the new size (in bytes) explicitly." };
|
||||
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user