Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
broadcom-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Broadcom
broadcom-utils
Commits
317d81db
Commit
317d81db
authored
5 years ago
by
Ronny Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Remove an argument we already know by a global variable.
parent
39541e16
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
brcm_fw_tool/image-ubi.c
+4
-6
4 additions, 6 deletions
brcm_fw_tool/image-ubi.c
with
4 additions
and
6 deletions
brcm_fw_tool/image-ubi.c
+
4
−
6
View file @
317d81db
...
...
@@ -117,25 +117,23 @@ static unsigned int ubi_read_blk(unsigned char *start, unsigned int blk, unsigne
//-------------------------------------------------------------
// Erase an UBI volume (if exists).
int
ubi_erase_volume
(
int
devId
,
int
volId
)
int
ubi_erase_volume
(
int
volId
)
{
char
nodePath
[
UBI_MAX_VOLUME_NAME
];
struct
ubi_vol_info
volInfo
;
memset
(
&
volInfo
,
0
,
sizeof
(
volInfo
));
if
(
!
ubi_dev_present
(
libubi
,
devId
))
return
-
1
;
if
(
ubi_get_vol_info1
(
libubi
,
devId
,
volId
,
&
volInfo
)
&&
errno
==
ENODEV
)
{
if
(
ubi_get_vol_info1
(
libubi
,
devInfo
.
dev_num
,
volId
,
&
volInfo
)
&&
errno
==
ENODEV
)
{
fprintf
(
stderr
,
"Error deleting volume %d: %s
\n
"
,
volId
,
strerror
(
errno
));
return
-
1
;
}
else
if
(
volInfo
.
dev_num
!=
devI
d
||
volInfo
.
vol_id
!=
volId
)
{
else
if
(
volInfo
.
dev_num
!=
devI
nfo
.
dev_num
||
volInfo
.
vol_id
!=
volId
)
{
fprintf
(
stderr
,
"Error deleting volume %d
\n
"
,
volId
);
return
-
1
;
}
snprintf
(
nodePath
,
UBI_MAX_VOLUME_NAME
,
"/dev/ubi%d"
,
devI
d
);
snprintf
(
nodePath
,
UBI_MAX_VOLUME_NAME
,
"/dev/ubi%d"
,
devI
nfo
.
dev_num
);
if
(
ubi_rmvol
(
libubi
,
nodePath
,
volId
))
{
fprintf
(
stderr
,
"Error deleting volume %d: %s
\n
"
,
volId
,
strerror
(
errno
));
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment