diff mbox series

[sg3_utils,2/3] Replace the references to /proc/scsi/sg/debug

Message ID 20220810182739.756352-3-bvanassche@acm.org
State New
Headers show
Series Prepare for removing /proc/scsi from the Linux kernel | expand

Commit Message

Bart Van Assche Aug. 10, 2022, 6:27 p.m. UTC
Prepare for the removal of /proc/scsi from the Linux kernel by removing the
references to /proc/scsi.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 testing/sg_mrq_dd.cpp | 12 ++++++------
 testing/sgh_dd.cpp    | 12 ++++++------
 testing/uapi_sg.h     |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/testing/sg_mrq_dd.cpp b/testing/sg_mrq_dd.cpp
index dc50ad21b8cf..40de12316b6d 100644
--- a/testing/sg_mrq_dd.cpp
+++ b/testing/sg_mrq_dd.cpp
@@ -632,12 +632,12 @@  page4:
             "each issued\nSCSI command. When both IFILE and OFILE are sg "
             "devices, then the READ in\neach read-write pair is issued an "
             "even pack_id and its WRITE pair is\ngiven the pack_id one "
-            "higher (i.e. an odd number). This enables a\n'cat '"
-            "/proc/scsi/sg/debug' user to see that progress is being "
+            "higher (i.e. an odd number). This enables a\n'dmesg -w' "
+            "user to see that progress is being "
             "made.\n\n");
     pr2serr("Debugging:\n"
             "Apart from using one or more '--verbose' options which gets a "
-            "bit noisy\n'cat /proc/scsi/sg/debug' can give a good overview "
+            "bit noisy\n'dmesg -w' can give a good overview "
             "of what is happening.\nThat does a sg driver object tree "
             "traversal that does minimal locking\nto make sure that each "
             "traversal is 'safe'. So it is important to note\nthe whole "
@@ -650,7 +650,7 @@  page4:
             "request entered it while some other nodes were being "
             "printed.\n\n");
     pr2serr("Busy state:\n"
-            "Busy state (abbreviated to 'bsy' in the /proc/scsi/sg/debug "
+            "Busy state (abbreviated to 'bsy' in the dmesg "
             "output)\nis entered during request setup and completion. It "
             "is intended to be\na temporary state. It should not block "
             "but does sometimes (e.g. in\nblock_get_request()). Even so "
@@ -1255,7 +1255,7 @@  bypass:
     }
     if (clp->verbose) {
         t = 1;
-        /* more info in /proc/scsi/sg/debug */
+        /* more info in the kernel log */
         res = ioctl(fd, SG_SET_DEBUG, &t);
         if (res < 0)
             perror("sg_mrq_dd: SG_SET_DEBUG error");
@@ -1507,7 +1507,7 @@  sig_listen_thread(struct global_collection * clp)
                     } else
                         pr2serr_lk("%s: subsequent stall at pack_id=%d\n",
                                    __func__, pack_id);
-                    system_wrapper("/usr/bin/cat /proc/scsi/sg/debug\n");
+                    system_wrapper("/usr/bin/dmesg\n");
                 } else
                     prev_pack_id = pack_id;
             } else if (EAGAIN != err)
diff --git a/testing/sgh_dd.cpp b/testing/sgh_dd.cpp
index e329f6bc52f7..5482b0c39dc8 100644
--- a/testing/sgh_dd.cpp
+++ b/testing/sgh_dd.cpp
@@ -660,12 +660,12 @@  page4:
             "each issued\nSCSI command. When both IFILE and OFILE are sg "
             "devices, then the READ in\neach read-write pair is issued an "
             "even pack_id and its WRITE pair is\ngiven the pack_id one "
-            "higher (i.e. an odd number). This enables a\n'cat '"
-            "/proc/scsi/sg/debug' user to see that progress is being "
+            "higher (i.e. an odd number). This enables a\n'dmesg -w' "
+            "user to see that progress is being "
             "made.\n\n");
     pr2serr("Debugging:\n"
             "Apart from using one or more '--verbose' options which gets a "
-            "bit noisy\n'cat /proc/scsi/sg/debug' can give a good overview "
+            "bit noisy\n'dmesg -w' can give a good overview "
             "of what is happening.\nThat does a sg driver object tree "
             "traversal that does minimal locking\nto make sure that each "
             "traversal is 'safe'. So it is important to note\nthe whole "
@@ -678,7 +678,7 @@  page4:
             "request entered it while some other nodes were being "
             "printed.\n\n");
     pr2serr("Busy state:\n"
-            "Busy state (abbreviated to 'bsy' in the /proc/scsi/sg/debug "
+            "Busy state (abbreviated to 'bsy' in the dmesg "
             "output)\nis entered during request setup and completion. It "
             "is intended to be\na temporary state. It should not block "
             "but does sometimes (e.g. in\nblock_get_request()). Even so "
@@ -1258,7 +1258,7 @@  sig_listen_thread(void * v_clp)
                     } else
                         pr2serr_lk("%s: subsequent stall at pack_id=%d\n",
                                __func__, pack_id);
-                    system_wrapper("/usr/bin/cat /proc/scsi/sg/debug\n");
+                    system_wrapper("/usr/bin/dmesg\n");
                 } else
                     prev_pack_id = pack_id;
             } else if (EAGAIN != err)
@@ -3752,7 +3752,7 @@  bypass:
         }
     }
     t = 1;
-    res = ioctl(fd, SG_SET_DEBUG, &t);  /* more info in /proc/scsi/sg/debug */
+    res = ioctl(fd, SG_SET_DEBUG, &t);  /* more info in the kernel log */
     if (res < 0)
         perror("sgs_dd: SG_SET_DEBUG error");
     return (res < 0) ? 0 : num;
diff --git a/testing/uapi_sg.h b/testing/uapi_sg.h
index 270ad4689ea7..9cc51dc00654 100644
--- a/testing/uapi_sg.h
+++ b/testing/uapi_sg.h
@@ -442,8 +442,8 @@  struct sg_header {
 #define SG_SET_COMMAND_Q 0x2271   /* Change queuing state with 0 or 1 */
 
 /*
- * Turn on/off error sense trace (1 and 0 respectively, default is off).
- * Try using: "# cat /proc/scsi/sg/debug" instead in the v3 driver
+ * Turn on/off error sense trace in the kernel log (1 and 0 respectively, default is
+ * off).
  */
 #define SG_SET_DEBUG 0x227e    /* 0 -> turn off debug */