LOG PAGE rework - rfc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

LOG PAGE rework - rfc

Mark Harvey
I've reworked the log page handling to linked-lists. (similar to MODE PAGE changes the other day)

This is a request-for-comment posting.

I realize there is still much work to do. But this should be functional.

0001-Move-LOG-SENSE-SELECT-data-into-linked-list.patch

Items still to do.

 - Merge ssc_log_sense() and smc_log_sense() into 'spc_log_sense()' to reduce common functionality.
 - review each device emulation and implement the appropriate log page(s) for those devices. (Same needs to be done for MODE PAGES)

Long term - actually fill in some of the log data with real info. :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: LOG PAGE rework - rfc

Mark Harvey
Darn, forgot to remove three 'hex_dump()' calls

Sorry..

diff --git a/usr/log.c b/usr/log.c
index 1bb8e87..76e5049 100644
--- a/usr/log.c
+++ b/usr/log.c
@@ -230,8 +230,6 @@ int add_log_tape_alert(struct lu_phy_attr *lu)

        memcpy(log_pg->p, &tp, sizeof(tp));

-       hex_dump(log_pg->p, sizeof(tp));
-
        return 0;
 }

diff --git a/usr/smc.c b/usr/smc.c
index e4dbde3..55a988c 100644
--- a/usr/smc.c
+++ b/usr/smc.c
@@ -1385,8 +1385,6 @@ uint8_t smc_log_sense(struct scsi_cmd *cmd)
                b = memcpy(b, l->p, l->size);
                retval = l->size;

-               hex_dump(b, l->size);
-
                /* Clear flags after value read. */
                if (alloc_len > 4)
                        update_TapeAlert(lu, 0);
diff --git a/usr/ssc.c b/usr/ssc.c
index 5a458a2..4edd5a6 100644
--- a/usr/ssc.c
+++ b/usr/ssc.c
@@ -1251,8 +1251,6 @@ uint8_t ssc_log_sense(struct scsi_cmd *cmd)
                b = memcpy(b, l->p, l->size);
                retval = l->size;

-               hex_dump(b, l->size);
-
                /* Clear flags after value read. */
                if (alloc_len > 4)
                        update_TapeAlert(lu, 0);

Loading...