cluster/gfs2/edit hexedit.c
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2007-11-07 15:07:08
Modified files:
gfs2/edit : hexedit.c
Log message:
Fix a divide by zero if the target isn't a gfs or gfs2 file system.
gfs2/edit/hexedit.c +3 -1
@@ -1322,7 +1322,9 @@else gfs1 = FALSE; bufsize = sbd.sd_sb.sb_bsize; - block =0x10 * (4096 / bufsize); +if (!bufsize) + bufsize =GFS2_DEFAULT_BSIZE ; + block =0x10 * (GFS2_DEFAULT_BSIZE / bufsize); }/* ------------------------------------------------------------------------ */