From da6ea8937153015958a952808671e06e412a5eaa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 09:07:08 +0000 Subject: [PATCH] generator: Move some deprecated functions to actions_core_deprecated.ml. Fixes commit 97773d2bbee8e28830fd689deef9e9f63ce0c18e. --- generator/actions_core.ml | 83 ---------------------------- generator/actions_core_deprecated.ml | 83 ++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/generator/actions_core.ml b/generator/actions_core.ml index e6628276c..ed89f74aa 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -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 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. - -This is the same as the L 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. - -This is the same as C except that if C -is a symbolic link, then the link is stat-ed, not the file it -refers to. - -This is the same as the L 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." }; This creates an LVM logical volume called C on the volume group C, with C 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. The contents of the -file is the string C (which can contain any 8 bit data), -with length C. - -As a special case, if C is C<0> -then the length is calculated using C (so in this case -the content cannot contain embedded ASCII NULs). - -I Owing to a bug, writing content containing ASCII NUL -characters does I 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." }; - { 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 bytes from one source device -or file C to another destination device or file C. - -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." }; shortdesc = "resize an LVM physical volume (with size)"; longdesc = "\ This command is the same as C 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 except that it allows you to specify the new size (in bytes) explicitly." }; { defaults with diff --git a/generator/actions_core_deprecated.ml b/generator/actions_core_deprecated.ml index 3c9b890b7..b8cca791b 100644 --- a/generator/actions_core_deprecated.ml +++ b/generator/actions_core_deprecated.ml @@ -105,6 +105,38 @@ list a directory contents without making many round-trips. See also C 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. + +This is the same as the L 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. + +This is the same as C except that if C +is a symbolic link, then the link is stat-ed, not the file it +refers to. + +This is the same as the L system call." }; + ] let daemon_functions = [ @@ -751,4 +783,55 @@ List the files in F in the format of 'ls -laZ'. This command is mostly useful for interactive sessions. It is I 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. The contents of the +file is the string C (which can contain any 8 bit data), +with length C. + +As a special case, if C is C<0> +then the length is calculated using C (so in this case +the content cannot contain embedded ASCII NULs). + +I Owing to a bug, writing content containing ASCII NUL +characters does I 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 bytes from one source device +or file C to another destination device or file C. + +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 except that it +allows you to specify the new size (in bytes) explicitly." }; + ]