summaryrefslogtreecommitdiffstats
path: root/commands/partition.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-08-26 10:57:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2008-08-26 11:40:51 +0200
commitcfdb83790612df60ef523e9dedb26be1708d1157 (patch)
tree5fd649374bc8cb9d2dabb7a4cc26309dde28d41e /commands/partition.c
parentbc7915cafad31e8e86c864a08da99f2450df2208 (diff)
downloadbarebox-cfdb83790612df60ef523e9dedb26be1708d1157.tar.gz
barebox-cfdb83790612df60ef523e9dedb26be1708d1157.tar.xz
partition: rename variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/partition.c')
-rwxr-xr-xcommands/partition.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/commands/partition.c b/commands/partition.c
index 9148725522..399cb62005 100755
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -109,7 +109,7 @@ static int dev_check_fixed(struct device_d *physdev, struct partition *new_part)
return 0;
}
-static int mtd_part_do_parse_one(struct partition *part, const char *str,
+static int mtd_part_do_parse_one(struct partition *part, const char *partstr,
char **endp)
{
ulong size;
@@ -118,11 +118,11 @@ static int mtd_part_do_parse_one(struct partition *part, const char *str,
memset(buf, 0, MAX_DRIVER_NAME);
- if (*str == '-') {
+ if (*partstr == '-') {
size = part->physdev->size - part->offset;
- end = (char *)str + 1;
+ end = (char *)partstr + 1;
} else {
- size = strtoul_suffix(str, &end, 0);
+ size = strtoul_suffix(partstr, &end, 0);
}
if (size + part->offset > part->physdev->size) {
@@ -130,29 +130,29 @@ static int mtd_part_do_parse_one(struct partition *part, const char *str,
return -EINVAL;
}
- str = end;
+ partstr = end;
- if (*str == '(') {
- str++;
- end = strchr(str, ')');
+ if (*partstr == '(') {
+ partstr++;
+ end = strchr(partstr, ')');
if (!end) {
printf("could not find matching ')'\n");
return -EINVAL;
}
- if (end - str >= MAX_DRIVER_NAME) {
+ if (end - partstr >= MAX_DRIVER_NAME) {
printf("device name too long\n");
return -EINVAL;
}
- memcpy(part->name, str, end - str);
+ memcpy(part->name, partstr, end - partstr);
end++;
}
- str = end;
+ partstr = end;
- if (*str == 'r' && *(str + 1) == 'o') {
+ if (*partstr == 'r' && *(partstr + 1) == 'o') {
part->flags |= PARTITION_READONLY;
- end = (char *)(str + 2);
+ end = (char *)(partstr + 2);
}
if (endp)