]> git.pld-linux.org Git - packages/hdparm.git/commitdiff
- big endian/little endian patch for sparc (from rawhide).
authorkloczek <kloczek@pld-linux.org>
Mon, 17 Jan 2000 00:03:56 +0000 (00:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    hdparm-sparc.patch -> 1.1

hdparm-sparc.patch [new file with mode: 0644]

diff --git a/hdparm-sparc.patch b/hdparm-sparc.patch
new file mode 100644 (file)
index 0000000..838712a
--- /dev/null
@@ -0,0 +1,18 @@
+--- hdparm-3.3/hdparm.c.~1~    Tue Jul 30 18:16:03 1996
++++ hdparm-3.3/hdparm.c        Tue Apr 21 22:44:57 1998
+@@ -124,7 +124,13 @@
+       if (!(id->field_valid&1))
+               printf(" (maybe):");
+       printf(" CurCHS=%d/%d/%d, CurSects=%d",
+-              id->cur_cyls, id->cur_heads, id->cur_sectors, *(int *)&id->cur_capacity0);
++              id->cur_cyls, id->cur_heads, id->cur_sectors,
++#ifdef BIG_ENDIAN
++             (id->cur_capacity0 << 16) | id->cur_capacity1
++#else /* LITTLE_ENDIAN */
++             (id->cur_capacity1 << 16) | id->cur_capacity0
++#endif
++             );
+       printf(", LBA=%s", YN(id->capability&2));
+       if (id->capability&2)
+               printf(", LBAsects=%d", id->lba_capacity);
+
This page took 0.08861 seconds and 4 git commands to generate.