[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    extattr_set_* return type
From:       mdf () FreeBSD ! org
Date:       2013-03-30 21:30:21
Message-ID: CAMBSHm9kBuE4H5VDT3iHTsis24-J3nj8hhLBjOX3DS4k5qZRKA () mail ! gmail ! com
[Download RAW message or body]

Despite the man page correctly describing the return value for
extattr_set_*, I thought recently that they returned 0/-1 for
success/failure, not the number of bytes written, like write(2).  This is
because extattr_set_* is declared as returning an int, not an ssize_t.
 Both extattr_get and extattr_list return ssize_t, so this is inconsistent.

The patch at
http://people.freebsd.org/~mdf/0001-Fix-return-type-of-extattr_set_-and-fix-rmextattr-8-.patchfixes
this.  It compiles but it's untested.

I don't think any compat shims are needed, since an old application will
still sign extend and this will work (it's very unlikely anyone does
extattr_set for 2GB or more).

If anyone actually uses extattr on 64-bit, please test a new kernel but old
userspace to be sure nothing is broken.  I plan to commit this next week if
I don't hear otherwise.

Thanks,
matthew
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic