Skip to contentSkip to conversation

fdisk: remove unused hsc2sector macro

PATCH Applied Davidlohr Bueso 3 participants 4 messages May 6, 2012 – May 10, 2012 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 fdisk: remove unused hsc2sector macro

From: Davidlohr Bueso <[email protected]>

---
fdisk/fdisk.c | 2 --

1 files changed, 0 insertions(+), 2 deletions(-)
fdisk/fdisk.c +0 -0
index dccaf27..3543745 100644
@@ -68,8 +68,6 @@ int MBRbuffer_changed;

#define sector(s) ((s) & 0x3f)
#define cylinder(s, c) ((c) | (((s) & 0xc0) << 2))

-#define hsc2sector(h,s,c) (sector(s) - 1 + sectors * \
- ((h) + heads * cylinder(s,c)))
#define set_hsc(h,s,c,sector) { \
s = sector % sectors + 1; \
sector /= sectors; \

Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 12 lines · Davidlohr Bueso

From: Davidlohr Bueso <[email protected]>

---
fdisk/fdisk.c | 2 --

1 files changed, 0 insertions(+), 2 deletions(-)
fdisk/fdisk.c +0 -0
index dccaf27..3543745 100644

fdisk/fdisk.c int MBRbuffer_changed; · line 73

Quoted 8 lines
fdisk/fdisk.c +0 -2
@@ -68,8 +68,6 @@ int MBRbuffer_changed;
 #define sector(s) ((s) & 0x3f)
 #define cylinder(s, c) ((c) | (((s) & 0xc0) << 2))
 
-#define hsc2sector(h,s,c) (sector(s) - 1 + sectors * \
- ((h) + heads * cylinder(s,c)))
 #define set_hsc(h,s,c,sector) { \
 s = sector % sectors + 1; \
 sector /= sectors; \

This patch seems to be malformed. Could you please check what's wrong?

Thanks,

Petr

--
Petr Uzel
IRC: ptr_uzl @ freenode

#2 lore raw
Quoted 16 lines · Petr Uzel
Quoted 15 lines · Davidlohr Bueso

From: Davidlohr Bueso <[email protected]>

---
fdisk/fdisk.c | 2 --

1 files changed, 0 insertions(+), 2 deletions(-)
fdisk/fdisk.c +0 -0
index dccaf27..3543745 100644
@@ -68,8 +68,6 @@ int MBRbuffer_changed;
 #define sector(s) ((s) & 0x3f)
 #define cylinder(s, c) ((c) | (((s) & 0xc0) << 2))
 
Quoted 7 lines

fdisk/fdisk.c int MBRbuffer_changed; · line 73

Quoted 5 lines
fdisk/fdisk.c +0 -2
-#define hsc2sector(h,s,c) (sector(s) - 1 + sectors * \
- ((h) + heads * cylinder(s,c)))
 #define set_hsc(h,s,c,sector) { \
 s = sector % sectors + 1; \
 sector /= sectors; \

This patch seems to be malformed. Could you please check what's wrong?

Hmm perhaps my mail client did something stupid (or me :)

From: Davidlohr Bueso <[email protected]>
Date: Sun, 6 May 2012 20:51:37 +0200
Subject: [PATCH] fdisk: remove unused hsc2sector-macor

---
 fdisk/fdisk.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
fdisk/fdisk.c +0 -2
index dccaf27..3543745 100644
@@ -68,8 +68,6 @@ int MBRbuffer_changed;
 #define sector(s)	((s) & 0x3f)
 #define cylinder(s, c)	((c) | (((s) & 0xc0) << 2))
 
-#define hsc2sector(h,s,c) (sector(s) - 1 + sectors * \
-				((h) + heads * cylinder(s,c)))
 #define set_hsc(h,s,c,sector) { \
 				s = sector % sectors + 1;	\
 				sector /= sectors;	\
Signature · 1 line
1.7.4.1
maintainer Applied
#3 lore raw
Quoted 2 lines · Davidlohr Bueso
 fdisk/fdisk.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com