diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-11 16:20:23 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-11 16:26:32 +0100 |
commit | 16b2ffa97ea8b2872306bc4400605821440f6589 (patch) | |
tree | 931d942815f2fc0b47ae56805edff5973a86359b /sysprep/sysprep_operation.ml | |
parent | a3d6629a0b54aca6d7b5b38750399b5396cdbf07 (diff) | |
download | libguestfs-16b2ffa97ea8b2872306bc4400605821440f6589.tar.gz libguestfs-16b2ffa97ea8b2872306bc4400605821440f6589.tar.xz libguestfs-16b2ffa97ea8b2872306bc4400605821440f6589.zip |
sysprep: Make a common Utils.compare_command_line_args function.
This isn't quite code motion, since the new function also ignores case
(which previously we didn't ignore).
Diffstat (limited to 'sysprep/sysprep_operation.ml')
-rw-r--r-- | sysprep/sysprep_operation.ml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sysprep/sysprep_operation.ml b/sysprep/sysprep_operation.ml index a77b66d2..b48d8f8b 100644 --- a/sysprep/sysprep_operation.ml +++ b/sysprep/sysprep_operation.ml @@ -138,10 +138,8 @@ let dump_pod_options () = | Arg.Rest _ -> assert false (* XXX not implemented *) ) args in - let args = List.sort ( - fun (a, _) (b, _) -> - compare (skip_dashes a) (skip_dashes b) - ) args in + let args = + List.sort (fun (a, _) (b, _) -> compare_command_line_args a b) args in List.iter ( fun (arg_name, (op_name, heading, pod)) -> |