[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix msdos_partition_set_system segfault

From: Andrew Clausen
Subject: Re: [PATCH] fix msdos_partition_set_system segfault
Date: Fri, 1 Feb 2002 11:49:21 +1100
User-agent: Mutt/1.2.5i

On Thu, Jan 31, 2002 at 05:29:56PM -0700, Andreas Dilger wrote:
> The following patch fixes msdos_partition_set_system() so that it will not
> segfault if a NULL fs_type is passed in.  It would _appear_ that this is
> handled in some cases, and is also handled in other set_system() methods,
> but maybe some changes were added on withouth thinking about this case.

Yeah, it used not to be permitted, but now we do (changed recently)
so I'm not surprised.  Thanks!

> An independent patch (which brings this problem out) is also included,
> but probably isn't what you want in the real product.  It allows you
> to continue in the case where filesystem support is disabled and there
> is an empty list for the filesystem type (otherwise it is not possible
> to create a partition at all).

It should probably read:

        if (!fs_type && !def_type)

Also, command_line_get_fs_type() should no about "no file systems".

> In theory, you should still be able to specify "fat32" as the filesystem
> type and get all of the corresponding magic for msdos partition types,
> but that is currently impossible.  You could do this by passing a new
> fs_type with NULL ->ops into these routines, just so you get the ->name
> field down there, but that might blow up later (I don't know).

Well, you shouldn't disable file systems completely, IMHO... only the
fancy stuff (resizing, etc.).

Perhaps I could change set_system() to accept a string instead...

BTW: diff -up is nice


(/me way behind on maintainence, due to internet outages
at both ends, etc. :( )

reply via email to

[Prev in Thread] Current Thread [Next in Thread]