Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-grub2
Commits
93586351
Commit
93586351
authored
Jan 20, 2015
by
Vladimir Serbinenko
Browse files
grub_dmraid_nv_detect: Do not divide by zero.
parent
98f74998
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
93586351
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Do not
divide by zero.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/hfs.c (grub_hfs_mount): Additional filesystem
grub-core/disk/dmraid_nvidia.c
View file @
93586351
...
...
@@ -129,6 +129,9 @@ grub_dmraid_nv_detect (grub_disk_t disk,
case
NV_LEVEL_0
:
level
=
0
;
disk_size
=
sb
.
capacity
/
sb
.
array
.
total_volumes
;
if
(
sb
.
array
.
total_volumes
==
0
)
/* Not RAID. */
return
NULL
;
break
;
case
NV_LEVEL_1
:
...
...
@@ -139,6 +142,9 @@ grub_dmraid_nv_detect (grub_disk_t disk,
case
NV_LEVEL_5
:
level
=
5
;
disk_size
=
sb
.
capacity
/
(
sb
.
array
.
total_volumes
-
1
);
if
(
sb
.
array
.
total_volumes
==
0
||
sb
.
array
.
total_volumes
==
1
)
/* Not RAID. */
return
NULL
;
break
;
default:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment