On 04/30/2013 02:33 PM, Nicholas A. Bellinger wrote:
On Tue, 2013-04-30 at 11:59 -0700, Andy Grover wrote:
User tools need to know if the device is properly configured, since if
not, some other attributes are invalid.
+static ssize_t target_core_show_dev_enable(void *p, char *page)
+{
+ struct se_device *dev = p;
+
+ return snprintf(page, PAGE_SIZE, "%d\n", !!(dev->dev_flags & DF_CONFIGURED));
+}
Dropping the unnecessary !! here, and applying to queue.
If DF_CONFIGURED is redefined in the future to be something other than
1, with the "!!", the function will still return just 1 or 0. Just being
cautious...
Regards -- Andy
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html