Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
762d32a9
Commit
762d32a9
authored
Jul 23, 2013
by
Pat Wood
Browse files
print out correct number of partitions
parent
653ae97b
Changes
1
Hide whitespace changes
Inline
Side-by-side
nand-part.c
View file @
762d32a9
...
...
@@ -165,6 +165,7 @@ void printmbr(MBR *mbr)
unsigned
int
part_cnt
;
printmbrheader
(
mbr
);
printf
(
"%d partitions
\n
"
,
mbr
->
PartCount
);
for
(
part_cnt
=
0
;
part_cnt
<
mbr
->
PartCount
&&
part_cnt
<
MAX_PART_COUNT
;
part_cnt
++
)
{
printf
(
"partition %2d: class = %12s, name = %12s, partition start = %8d, partition size = %8d user_type=%d
\n
"
,
...
...
@@ -178,7 +179,6 @@ void printmbr(MBR *mbr)
}
void
checkmbrs
(
int
fd
)
{
unsigned
int
part_cnt
=
0
;
int
i
;
MBR
*
mbrs
[
MBR_COPY_NUM
];
MBR
*
mbr
=
NULL
;
...
...
@@ -203,7 +203,6 @@ void checkmbrs(int fd)
if
(
mbrs
[
i
])
_free_mbr
(
mbrs
[
i
]);
}
printf
(
"%d partitions
\n
"
,
part_cnt
);
}
int
writembrs
(
int
fd
,
char
names
[][
MAX_NAME
],
__u32
start
,
__u32
*
lens
,
unsigned
int
*
user_types
,
int
nparts
,
int
partoffset
,
int
force
)
...
...
@@ -271,7 +270,6 @@ int writembrs(int fd, char names[][MAX_NAME], __u32 start, __u32 *lens, unsigned
if
(
mbrs
[
i
])
_free_mbr
(
mbrs
[
i
]);
}
printf
(
"%d partitions
\n
"
,
part_cnt
);
printf
(
"
\n
write new partition tables? (Y/N)
\n
"
);
read
(
0
,
&
yn
,
1
);
if
(
yn
!=
'Y'
&&
yn
!=
'y'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment