CVS commit: src/sys/fs/msdosfs

2021-02-10 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Thu Feb 11 00:15:55 UTC 2021

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Enable to mount Raspberry Pi Pico's USB mass storage partition

Fix PR kern/55985.
O.k. by thorpej@.

Pull-up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2020-09-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Sep  7 01:35:25 UTC 2020

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
avoid an uninit warning with GCC 9.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 22:07:59 UTC 2018

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
Avoid undefined behavior semantics in msdosfs_fat.c

Do not change signedness bit with left shift.
While there avoid signed integer overflow.
Address both issues with using unsigned type.

msdosfs_fat.c:512:42, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:521:44, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:744:14, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:744:24, signed integer overflow: -2147483648 - 1 cannot be 
represented in type 'int [20]'
msdosfs_fat.c:840:13, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:840:36, signed integer overflow: -2147483648 - 1 cannot be 
represented in type 'int [20]'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2018-01-26 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Sat Jan 27 03:54:01 UTC 2018

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
Need strings.h for ffs()
Resolves implict declaration warning of ffs() when building tools via build.sh


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2017-11-27 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Nov 27 15:02:05 UTC 2017

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
relax sanity check. It's ok to have more FAT sectors than needed.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2017-08-20 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 20 11:48:15 UTC 2017

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Add more sanity checks for BPB parameters. Handle FAT12 format for media
with sectors >= 32kByte.

Does fix PR 52485.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2017-03-01 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Mar  1 10:41:28 UTC 2017

Modified Files:
src/sys/fs/msdosfs: msdosfs_denode.c msdosfs_vfsops.c msdosfs_vnops.c

Log Message:
Remove now redundant calls to fstrans_start()/fstrans_done().


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/fs/msdosfs/msdosfs_denode.c
cvs rdiff -u -r1.123 -r1.124 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.96 -r1.97 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2017-02-17 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Feb 17 08:27:20 UTC 2017

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Take vnode lock for VOP_FSYNC().


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2017-01-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Jan 14 17:17:53 UTC 2017

Modified Files:
src/sys/fs/msdosfs: denode.h

Log Message:
Be explicit about how we're placing part of the on-disk name into
the extension, so it doesn't appear like we are overrunning an array.
Appeases coverity, NFC.

ok riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/fs/msdosfs/denode.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-06-30 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jun 30 09:34:01 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_conv.c

Log Message:
Fix false positives when comparing long file names that have the
same first 13 (or some multiple thereof) characters.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/fs/msdosfs/msdosfs_conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-05-07 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  7 16:43:02 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
fix DEBUG build


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-05-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue May  3 18:17:29 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
Validate FAT entries to avoid some panics caused by a corrupted FAT.

Also print FAT write errors when mount is synchronous (-o sync). This
reveals problems caused by a write protected disklabel on sector 1.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-03-05 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Mar  6 07:33:25 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_conv.c

Log Message:
Use KASSERT for conditions that cannot be met with current parameters.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/msdosfs/msdosfs_conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-02-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb  6 14:11:58 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_unicode.c

Log Message:
Toolify.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/fs/msdosfs/msdosfs_unicode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-02-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  1 16:53:24 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_conv.c msdosfs_vnops.c

Log Message:
- split a long line.
- remove extra test.
- move d_namlen setting to msdosfs_vnops.c to avoid the ifdef.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/fs/msdosfs/msdosfs_conv.c
cvs rdiff -u -r1.95 -r1.96 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-02-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  1 10:37:57 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_conv.c

Log Message:
Avoid unsigned/signed comparision warning to fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/fs/msdosfs/msdosfs_conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-01-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  1 02:59:33 UTC 2016

Modified Files:
src/sys/fs/msdosfs: direntry.h msdosfs_conv.c msdosfs_vnops.c

Log Message:
We can't depend on dp->d_namlen existing for the parts that are used in
makefs(8).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/fs/msdosfs/direntry.h
cvs rdiff -u -r1.11 -r1.12 src/sys/fs/msdosfs/msdosfs_conv.c
cvs rdiff -u -r1.94 -r1.95 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-01-22 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jan 22 22:53:36 UTC 2016

Modified Files:
src/sys/fs/msdosfs: bpb.h direntry.h

Log Message:
u_int{8,16,32}_t -> uint{8,16,32}_t, also u_int -> unsigned and
u_char -> unsigned char.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/fs/msdosfs/bpb.h \
src/sys/fs/msdosfs/direntry.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2016-01-22 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jan 22 22:48:18 UTC 2016

Modified Files:
src/sys/fs/msdosfs: bootsect.h

Log Message:
u_int8_t -> uint8_t


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/fs/msdosfs/bootsect.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2015-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 23 03:33:58 UTC 2015

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
catch up with DPRINTF change


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2015-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 23 02:39:48 UTC 2015

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
add some more paranoid checks about secsize and struct use.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-07-18 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Jul 18 17:24:34 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Make DPRINTF more understandable, and replace my previous #ifdef DIAGNOSTIC...


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-07-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul 16 20:09:00 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Limit the minimum size of a disk sector to 512 bytes, to prevent memory
overflow on extremely low secsize. This normally conforms to the old standard
(for which there doesn't seem to be a clear spec). Since 2011, IDEMA's Advanced
Format standardizes it to 4k, so this change won't cause any trouble on
new devices.

Put the printf under DIAGNOSTIC temporarily to see if someone complains.

after a quick discussion on tech-kern


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-07-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 15 11:43:54 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Correct the bread size of struct fsinfo from Gerald Lee at DELL dot com


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul  9 09:00:18 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Minor changes:
 - malloc()+memset() -> malloc(|M_ZERO)
 - rename 'vers' to 'FSVers'
 - declare 'ExtFlags' instead of calling getushort() two times


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-07-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul  8 19:34:47 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
- Perform sanity checks not just for GEMDOSFS, but for all FAT devices. This
  also fixes a division-by-zero bug that could crash the system.
- Define GEMDOSFS_BSIZE instead of a hard-coded 512 value, and remove 'bsize'.
- Rename 'tmp' to 'BlkPerSec'.

>From me, FreeBSD, OpenBSD and the FAT specification.

ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-07-08 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Jul  8 09:21:52 UTC 2014

Modified Files:
src/sys/fs/msdosfs: denode.h msdosfs_denode.c msdosfs_lookup.c
msdosfs_vfsops.c msdosfs_vnops.c msdosfsmount.h

Log Message:
Change msdosfs from hashlist to vcache:
- Use (dir_cluster, dir_offset, dir_generation) as key, where
  dir_generation is non-zero and unique for unlinked but open nodes.
- Change deget() to return a vnode as it is unsafe to return a
  referenced but unlocked denode.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.49 -r1.50 src/sys/fs/msdosfs/msdosfs_denode.c
cvs rdiff -u -r1.32 -r1.33 src/sys/fs/msdosfs/msdosfs_lookup.c
cvs rdiff -u -r1.108 -r1.109 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.89 -r1.90 src/sys/fs/msdosfs/msdosfs_vnops.c
cvs rdiff -u -r1.19 -r1.20 src/sys/fs/msdosfs/msdosfsmount.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-05-30 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri May 30 08:42:35 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_denode.c

Log Message:
msdosfs_reclaim(): add missing fstrans and protect change
of v_data with v_interlock as msdosfs_sync() now needs it.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/fs/msdosfs/msdosfs_denode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2014-03-17 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar 17 09:35:59 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Change msdosfs_sync() to use vfs_vnode_iterator.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-12-24 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Dec 24 16:51:24 UTC 2013

Modified Files:
src/sys/fs/msdosfs: msdosfs_lookup.c

Log Message:
don't treat adjacent members as a larger array
Coverity CID 977367


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/fs/msdosfs/msdosfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-11-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Nov  2 10:30:18 UTC 2013

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Stop using v_mount of an unreferenced vnode -- save the mount while
the vnode has a reference.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-10-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 20 00:01:55 UTC 2013

Modified Files:
src/sys/fs/msdosfs: direntry.h

Log Message:
provide a function to access the name and extension as a single array as
opposed depend on array index overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/fs/msdosfs/direntry.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-04-15 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Apr 15 14:11:00 UTC 2013

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Don't attempt to mount file system with clusters larger than MAXBSIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-01-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 28 00:17:18 UTC 2013

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
A little more debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-01-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 27 22:04:19 UTC 2013

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
don't need sys/mount.h in userland.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-01-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 27 20:15:58 UTC 2013

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
tidy up debugging printfs; no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-01-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 26 19:45:02 UTC 2013

Modified Files:
src/sys/fs/msdosfs: denode.h

Log Message:
fix fstat build.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/fs/msdosfs/denode.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-01-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 26 16:51:51 UTC 2013

Modified Files:
src/sys/fs/msdosfs: denode.h msdosfs_conv.c msdosfs_fat.c
msdosfs_lookup.c msdosfsmount.h

Log Message:
more cross-compile friendly.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.8 -r1.9 src/sys/fs/msdosfs/msdosfs_conv.c
cvs rdiff -u -r1.24 -r1.25 src/sys/fs/msdosfs/msdosfs_fat.c
cvs rdiff -u -r1.28 -r1.29 src/sys/fs/msdosfs/msdosfs_lookup.c
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/msdosfs/msdosfsmount.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2013-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 26 00:21:49 UTC 2013

Modified Files:
src/sys/fs/msdosfs: denode.h direntry.h fat.h msdosfs_conv.c
msdosfs_fat.c msdosfs_lookup.c msdosfsmount.h

Log Message:
expose more stuff if MAKEFS is defined for the headers, and arrange for
the source file to be compilable from userland.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.5 -r1.6 src/sys/fs/msdosfs/direntry.h
cvs rdiff -u -r1.7 -r1.8 src/sys/fs/msdosfs/fat.h \
src/sys/fs/msdosfs/msdosfs_conv.c
cvs rdiff -u -r1.23 -r1.24 src/sys/fs/msdosfs/msdosfs_fat.c
cvs rdiff -u -r1.27 -r1.28 src/sys/fs/msdosfs/msdosfs_lookup.c
cvs rdiff -u -r1.17 -r1.18 src/sys/fs/msdosfs/msdosfsmount.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-12-28 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Dec 28 08:04:00 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Move the initialization of n to after the error branch.

>From Taylor R Campbell 


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-12-20 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Dec 20 11:44:39 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
Revert rev. 1.20 now that bread() has been fixed.

PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-11-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Nov  4 17:57:59 UTC 2012

Modified Files:
src/sys/fs/msdosfs: bootsect.h bpb.h denode.h fat.h msdosfs_denode.c
msdosfs_fat.c msdosfs_vfsops.c msdosfsmount.h

Log Message:
Stylistic changes in comments/strings:
"FAT" and "fat" are different things, use the appropriate case.
"GEMDOS" is all caps.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/fs/msdosfs/bootsect.h
cvs rdiff -u -r1.6 -r1.7 src/sys/fs/msdosfs/bpb.h src/sys/fs/msdosfs/fat.h
cvs rdiff -u -r1.19 -r1.20 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.46 -r1.47 src/sys/fs/msdosfs/msdosfs_denode.c
cvs rdiff -u -r1.20 -r1.21 src/sys/fs/msdosfs/msdosfs_fat.c
cvs rdiff -u -r1.99 -r1.100 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.16 -r1.17 src/sys/fs/msdosfs/msdosfsmount.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-11-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Nov  4 17:35:27 UTC 2012

Modified Files:
src/sys/fs/msdosfs: fat.h

Log Message:
And correct a typo that wasn't corrected in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/fs/msdosfs/fat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-11-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Nov  4 17:33:46 UTC 2012

Modified Files:
src/sys/fs/msdosfs: fat.h

Log Message:
Correct constant in comment to match the expression it is derived from.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/fs/msdosfs/fat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-11-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Nov  4 17:18:56 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Check that the FSInfo block's next free cluster suggestion is actually
a cluster within the bounds of the volume too.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-11-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Nov  4 17:16:37 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
((u_long)-1) will not always be 0x, which is what we actually
want to test against to determine if the FSInfo block's next free
cluster suggestion is valid


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-10-03 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Oct  3 23:32:43 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
We don't actually want to round the number of elements in the bitmap
down.  Fixes a self-inflicted buffer overrun.

(This was detected by chance that the top of the bitmap coincided with
a page boundary.)


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-07-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  7 16:18:50 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Revert rev 1.95 since getdisksize() no longer returns secsize=0.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-06-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 30 11:01:42 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Add a sanity check if secsize returned from getdisksize() isn't bogus.
This prevent possible panic "panic: buf mem pool index 23" later in
vfs_bio.c:buf_mempoolidx().
(I'm not sure if it's okay for getdisksize() to assume that
 partinfo taken from DIOCGPART is properly initialized
 on all disk(9) devices or not)

See also:
http://mail-index.NetBSD.org/source-changes/2012/06/30/msg035298.html


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-04-09 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Apr  9 11:10:07 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
pcbmap(): We cannot use bread() here as for the pagedaemon getblk()
  may fail leading to a panic in bread().
  Replace bread() with getblk() / VOP_STRATEGY() and return
  an error if getblk() fails.

Fixes PR#46282: 6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread

This is an interim solution for easy pullup.  The final solution
is be to change bread() to not return a buffer on error.  As
we have to change all callers of bread() this will not qualify
for a pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-04-03 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Apr  3 14:58:55 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Add missing braces in previous commit.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-04-02 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Apr  2 07:30:22 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Report the SF_ARCHIVED file flag if set.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2012-02-02 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb  3 04:29:17 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfsmount.h

Log Message:
Only use MALLOC_DECLARE if it exists. Helps with the dirty _KERNEL
tricks fstat is using.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/msdosfs/msdosfsmount.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2011-11-21 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Nov 21 10:46:57 UTC 2011

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Add missing fstrans_done().

Should fix PR #45635 (KASSERT "fli->fli_trans_cnt == 0" failed)


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2011-03-22 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Mar 22 20:33:51 UTC 2011

Modified Files:
src/sys/fs/msdosfs: msdosfs_denode.c

Log Message:
When truncating a file purge the fat cache after setting the new size
and after all io but before actually updating the cluster chain.

Both uvm_vnp_zerorange() and vtruncbuf() call get/putpages -> bmap -> pcbmap
and here the fat cache gets updated with information no longer valid after
truncation.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/fs/msdosfs/msdosfs_denode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2011-03-20 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun Mar 20 12:21:28 UTC 2011

Modified Files:
src/sys/fs/msdosfs: msdosfs_denode.c msdosfs_vnops.c

Log Message:
When extending a file, either by truncating or by writing past EOF make
sure the unallocated remainder of the last page gets zeroed.

Detected by fsx.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/fs/msdosfs/msdosfs_denode.c
cvs rdiff -u -r1.73 -r1.74 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2011-03-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Mar  3 08:10:45 UTC 2011

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
In rename, use char[12]�for new names instead of [11].  At least
one routine called from here (unix2dosfn) expects and uses all of
a [12].

This may fix the "stack size exceeded" problem which has been
triggering in gson's test runs.  (i'm not entirely sure why it
doesn't trigger in anyone else's env)


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-12-14 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Dec 14 17:17:03 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
msdosfs_sync: check for dead vnode (denode == NULL) before testing denode flags.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-07-30 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Jul 30 16:40:43 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_lookup.c

Log Message:
Return EINVAL for rename and delete operations to the
root directory instead of the erroneous EROFS.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/fs/msdosfs/msdosfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-07-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Jul 22 18:08:12 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Remove bad cast, fix compilation with MSDOSFS_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-05-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue May 25 10:15:34 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Don't double unlock fvp if source file disappears during rename.
Problem found by njoly's awesome stresstester.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-04-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 13 10:12:43 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
polish previous


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-04-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 13 10:11:08 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
If getdisksize() fails (happens e.g. on fss block devices), don't
give up if we don't really need the information provided by it.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-04-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Apr  8 16:04:35 UTC 2010

Modified Files:
src/sys/fs/msdosfs: denode.h msdosfs_vnops.c

Log Message:
In genfs where available.

The only functional change is mknod now returning EOPNOTSUPP instead
of EINVAL.  I make this sacrifice willingly and with a clean conscience.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.62 -r1.63 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-04-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Apr  8 15:03:34 UTC 2010

Modified Files:
src/sys/fs/msdosfs: denode.h msdosfs_vnops.c

Log Message:
Use genfs instead of homegrown stuff where possible.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.61 -r1.62 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2010-04-07 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr  7 15:19:09 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
* Don't care about VOP_CLOSE() error in unmount.  In the extremely
  unlike event it did fail, the kernel would double lutz to doom
  (in failure devvp now remains unmountable until reboot.  fans
  of complicated & untested error branches may attempt to gunk this
  up.  i'm not one of them).
* cosmetic surgery: cut extra ;


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/fs/msdosfs/msdosfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.