pv 955274 - Print out hex instead of char for non-printable characters.
authorVlad Apostolov <vapo@sgi.com>
Mon, 2 Oct 2006 15:47:47 +0000 (15:47 +0000)
committerVlad Apostolov <vapo@sgi.com>
Mon, 2 Oct 2006 15:47:47 +0000 (15:47 +0000)
Merge of master-melb:xfs-cmds:27095a by kenmcd.

  pv 955274 - Print out hex instead of char for non-printable characters.

dmapi/src/suite2/src/test_invis.c

index 67412fb8a945d605b14c0f0c224dc78d93b30932..2db3524a4c03b11575cdce6f9f0a921933fa534c 100644 (file)
@@ -325,8 +325,8 @@ main(
                             statbuf.st_size : (1000000*(dm_off_t)(ch));
          if (dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, 
                             offset, 1, bufp)==-1){
                             statbuf.st_size : (1000000*(dm_off_t)(ch));
          if (dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, 
                             offset, 1, bufp)==-1){
-           printf("Error invis-writing %s at byte %u million: %s\n", 
-                  (u_char *)bufp, (unsigned int)ch, ERR_NAME);
+           printf("Error invis-writing 0x%x at byte 0x%x million: %s\n", 
+                  *(u_char *)bufp, (unsigned int)ch, ERR_NAME);
          }
          else if (dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN,
                                 offset, 1, bufp)==-1){
          }
          else if (dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN,
                                 offset, 1, bufp)==-1){