CVSROOT:        /cvs/cluster
Module name:    cluster
Changes by:     [EMAIL PROTECTED]       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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=cluster&r1=1.22&r2=1.23

--- cluster/gfs2/edit/hexedit.c 2007/10/18 19:56:41     1.22
+++ cluster/gfs2/edit/hexedit.c 2007/11/07 15:07:07     1.23
@@ -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);
 }
 
 /* ------------------------------------------------------------------------ */

Reply via email to