lkml.org 
[lkml]   [1999]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sed not working on /proc files
On Wed, 5 May 1999, Rogier Wolff wrote:

> ] unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len,
> ] unsigned long prot, unsigned long flags, unsigned long off)
> ] {
> ] struct mm_struct * mm = current->mm;
> ] struct vm_area_struct * vma;
> ] int error;
> ]
> ] if ((len = PAGE_ALIGN(len)) == 0)
> ] return addr;
>
> And "here" is where this happens.
>
> Wouldn't it be better to just do "return NULL"?

Dunno if this is POSIX or not, but in this case (len <= 0) Solaris returns
MAP_FAILED and sets errno to EINVAL.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.113 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site