From: <ga...@us...> - 2013-02-19 16:26:15
|
Revision: 5962 http://jnode.svn.sourceforge.net/jnode/?rev=5962&view=rev Author: galatnm Date: 2013-02-19 16:26:07 +0000 (Tue, 19 Feb 2013) Log Message: ----------- Expose the ext group descriptors + edit times only if filesystem is writable. (Luke Quinane) Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java Modified: trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java 2013-02-19 16:25:40 UTC (rev 5961) +++ trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java 2013-02-19 16:26:07 UTC (rev 5962) @@ -170,11 +170,11 @@ if (!isReadOnly()) { log.info(getDevice().getId() + " mounting fs r/w"); superblock.setState(Ext2Constants.EXT2_ERROR_FS); + // Mount successfull, update some superblock informations. + superblock.setMntCount(superblock.getMntCount() + 1); + superblock.setMTime(Ext2Utils.encodeDate(new Date())); + superblock.setWTime(Ext2Utils.encodeDate(new Date())); } - // Mount successfull, update some superblock informations. - superblock.setMntCount(superblock.getMntCount() + 1); - superblock.setMTime(Ext2Utils.encodeDate(new Date())); - superblock.setWTime(Ext2Utils.encodeDate(new Date())); SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy"); log.debug(" superblock: " + "\n" + " #Mount: " + superblock.getMntCount() + "\n" + " #MaxMount: " + superblock.getMaxMntCount() + "\n" + " Last mount time: " @@ -321,6 +321,15 @@ public int getBlockSize() { return superblock.getBlockSize(); } + + /** + * Gets the group descriptors for the file system. + * + * @return the group descriptors. + */ + public GroupDescriptor[] getGroupDescriptors() { + return groupDescriptors; + } /** * Read a data block and put it in the cache if it is not yet cached, otherwise get it from the cache. Synchronized This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |