* mount.h (fs_info::fsn): New member.

(fs_info::clear): Clear fsn.
	(fs_info::fsname): New read accessor for fsn.
	* mount.cc (fs_info::update): Fill in fsn member with lowercased
	filesystem name if filesystem is not well-known.  Fall back to
	"unknown" if filesystem name is missing.
	(fillout_mntent): Print filesystem name retrieved in fs_info::update
	rather than static string "unknown".
This commit is contained in:
Corinna Vinschen
2009-07-23 11:46:06 +00:00
parent 8b1e0815ab
commit a6131454a5
3 changed files with 28 additions and 3 deletions

View File

@@ -43,10 +43,16 @@ class fs_info
};
} status;
ULONG sernum;
char fsn[80];
unsigned long got_fs () { return status.fs_flags; }
public:
void clear () { memset (&status, 0 , sizeof status); sernum = 0UL; }
void clear ()
{
memset (&status, 0 , sizeof status);
sernum = 0UL;
fsn[0] = '\0';
}
fs_info () { clear (); }
IMPLEMENT_STATUS_FLAG (ULONG, flags)
@@ -71,6 +77,7 @@ class fs_info
int has_buggy_open () const {return is_sunwnfs ();}
int has_buggy_fileid_dirinfo () const {return is_unixfs ();}
const char *fsname () const { return fsn[0] ? fsn : "unknown"; }
bool update (PUNICODE_STRING, HANDLE) __attribute__ ((regparm (3)));
};