Bug#435885: manpages-dev: SWAPON(2) does not mention EINVAL for tmpfs

2007-08-10 Thread Michael Kerrisk
tags 435885 fixed-upstream
thanks


Michael Prokop wrote:
 * Michael Kerrisk [EMAIL PROTECTED] [20070805 10:10]:
 
 Mika,
 Could you phrase your suggested change as a patch?
 
 For sure, see attached patch.

Thanks Mika.

Applied for upstream 2.65.

Cheers,

Michael



 
 
 --- swapon.2.orig 2007-08-09 01:17:26.032390227 +0200
 +++ swapon.2  2007-08-09 01:39:20.442053844 +0200
 @@ -117,8 +117,8 @@
  exists, but refers neither to a regular file nor to a block device;
  or, for
  .BR swapon (),
 -the indicated path does not contain a valid swap signature;
 -or, for
 +the indicated path does not contain a valid swap signature or
 +is laying on an in-memory filesystem like tmpfs; or, for
  .BR swapoff (),
  .I path
  is not currently a swap area.

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?  Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#435885: manpages-dev: SWAPON(2) does not mention EINVAL for tmpfs

2007-08-08 Thread Michael Prokop
* Michael Kerrisk [EMAIL PROTECTED] [20070805 10:10]:

 Mika,
 Could you phrase your suggested change as a patch?

For sure, see attached patch.

thx  regards,
-mika-
--- swapon.2.orig	2007-08-09 01:17:26.032390227 +0200
+++ swapon.2	2007-08-09 01:39:20.442053844 +0200
@@ -117,8 +117,8 @@
 exists, but refers neither to a regular file nor to a block device;
 or, for
 .BR swapon (),
-the indicated path does not contain a valid swap signature;
-or, for
+the indicated path does not contain a valid swap signature or
+is laying on an in-memory filesystem like tmpfs; or, for
 .BR swapoff (),
 .I path
 is not currently a swap area.


signature.asc
Description: Digital signature


Bug#435885: manpages-dev: SWAPON(2) does not mention EINVAL for tmpfs

2007-08-05 Thread Michael Kerrisk
Mika,

Could you phrase your suggested change as a patch?

Thanks,

Michael

Michael Prokop wrote:
 Package: manpages-dev
 Version: 2.62-1
 Severity: minor
 
 Quoting swapon(2):
 
 | EINVAL The file path exists, but refers neither to a regular file nor to a 
 block device; or, for swapon(),
 |the  indicated  path  does  not contain a valid swap signature; or, 
 for swapoff(), path is not cur‐
 |rently a swap area.
 
 That's not true if the file is on a tmpfs.
 
 Demonstration:
 
 # dd if=/dev/zero of=/tmp/swap bs=1024 count=10
 10+0 records in
 10+0 records out
 10240 bytes (102 MB) copied, 0.373442 seconds, 274 MB/s
 # mkswap /tmp/swap
 Setting up swapspace version 1, size = 102395 kB
 no label, UUID=40138114-e7e5-4999-9d94-0a457e320199
 # file /tmp/swap
 /tmp/swap: Linux/i386 swap file (new style) 1 (4K pages) size 24999 pages
 # chmod 0600 /tmp/swap
 # swapon /tmp/swap
 swapon: /tmp/swap: Invalid argument
 # /usr/bin/stat -f -c %T /tmp
 tmpfs
 
 IMHO that fact should be mentioned in the manpage.
 
 regards,
 -mika-
 
 

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?  Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#435885: manpages-dev: SWAPON(2) does not mention EINVAL for tmpfs

2007-08-03 Thread Michael Prokop
Package: manpages-dev
Version: 2.62-1
Severity: minor

Quoting swapon(2):

| EINVAL The file path exists, but refers neither to a regular file nor to a 
block device; or, for swapon(),
|the  indicated  path  does  not contain a valid swap signature; or, 
for swapoff(), path is not cur‐
|rently a swap area.

That's not true if the file is on a tmpfs.

Demonstration:

# dd if=/dev/zero of=/tmp/swap bs=1024 count=10
10+0 records in
10+0 records out
10240 bytes (102 MB) copied, 0.373442 seconds, 274 MB/s
# mkswap /tmp/swap
Setting up swapspace version 1, size = 102395 kB
no label, UUID=40138114-e7e5-4999-9d94-0a457e320199
# file /tmp/swap
/tmp/swap: Linux/i386 swap file (new style) 1 (4K pages) size 24999 pages
# chmod 0600 /tmp/swap
# swapon /tmp/swap
swapon: /tmp/swap: Invalid argument
# /usr/bin/stat -f -c %T /tmp
tmpfs

IMHO that fact should be mentioned in the manpage.

regards,
-mika-