On Fri, Jan 18, 2019 at 09:42:34AM -0500, John Ferlan wrote:
Alter the "real" code to return -2 on virCommandRun failure. Alter the comments and function header to describe the function and it's returns.
*its
Signed-off-by: John Ferlan <[email protected]> --- src/util/virstoragefile.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index bd4b0274df..2511511d14 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1425,9 +1425,24 @@ int virStorageFileGetLVMKey(const char *path, } #endif +
Unrelated whitespace change
#ifdef WITH_UDEV
-int virStorageFileGetSCSIKey(const char *path,
- char **key)
+/* virStorageFileGetSCSIKey
+ * @path: Path to the SCSI device
+ * @key: Unique key to be returned
+ *
+ * Using a udev specific function, query the @path to get and return a
+ * unique @key for the caller to use.
+ *
+ * Returns:
+ * 0 On success, with the @key filled in or @key=NULL if the
+ * returned string was empty.
+ * -1 When WITH_UDEV is undefined and a system error is reported
+ * -2 When WITH_UDEV is defined, but calling virCommandRun fails
+ */
+int
+virStorageFileGetSCSIKey(const char *path,
+ char **key)
{
int status;
virCommandPtr cmd = virCommandNewArgList("/lib/udev/scsi_id",
Reviewed-by: Ján Tomko <[email protected]> Jano
signature.asc
Description: PGP signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
