]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Wed, 24 Feb 2010 22:20:53 +0000 (14:20 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Wed, 24 Feb 2010 22:20:53 +0000 (14:20 -0800)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/modules/linux/pvscsi/scsi_defs.h

index 4a8cea4de929cec79fa04db68c9901b1be23d386..8ffe2c301ea22ab2d828ce74577680f0f5646d41 100644 (file)
@@ -2163,6 +2163,34 @@ SCSICdb_IsWrite(uint8 cdb0)       // IN
 }
 
 
+/*
+ *---------------------------------------------------------------------------
+ *
+ * SCSICdb_ModifiesMedia --
+ *
+ *      This function returns TRUE if the scsi command passed as an argument
+ *      changes the storage medium
+ *
+ *      XXX PR 520576 This list needs to be expanded upon in order accurately
+ *                    represent all command types that modify the underlying
+ *                    storage medium
+ *
+ * Results:
+ *      TRUE/FALSE
+ *
+ * Side effects:
+ *      None.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+static INLINE Bool
+SCSICdb_ModifiesMedia(uint8 cdb0)       // IN
+{
+   return SCSICdb_IsWrite(cdb0) ||
+          cdb0 == SCSI_CMD_WRITE_SAME16;
+}
+
 /*
  *---------------------------------------------------------------------------
  *