Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[SSI] openssi/kernel/fs/proc base.c,1.2,1.3: msg#00128

Subject: [SSI] openssi/kernel/fs/proc base.c,1.2,1.3
Update of /cvsroot/ssic-linux/openssi/kernel/fs/proc
In directory sc8-pr-cvs1:/tmp/cvs-serv514/kernel/fs/proc

Modified Files:
        base.c 
Log Message:
Sync with RH branch


Index: base.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/fs/proc/base.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** base.c      5 Jun 2003 22:39:50 -0000       1.2
--- base.c      27 Jun 2003 21:56:09 -0000      1.3
***************
*** 27,30 ****
--- 27,32 ----
  #include <linux/vproc.h>
  #include <linux/dpvproc.h>
+ #include <cluster/ssi/cfs/cfs_clnt.h>
+ #include <cluster/ssi/cfs/cfs_fs_sb.h>
  #endif
  
***************
*** 565,571 ****
--- 567,614 ----
        len = tmp + PAGE_SIZE - 1 - path;
  
+ #ifdef CONFIG_SSI
+       if (len > buflen)
+               len = buflen;
+       copy_to_user(buffer, path, len);
+       /* Turn "/dev/" into "/dev/<node>/" */
+       if (cfs_inode_is_cfs(inode) && (inode->i_sb->s_flags & MS_DEVFS)) {
+               char *devp;
+               int nlen;
+               clusternode_t node;
+               struct nameidata tnd;
+               int error;
+ 
+               devp = strstr(path, "/dev/");
+               if (devp != NULL) {
+                       devp += 4;
+                       node = itocmi(inode)->mi_server;
+                       nlen = snprintf(tmp, 0, "/dev/%ld", node);
+                       if (devp - tmp >= nlen) {
+                               path = devp - nlen;
+                               (void)snprintf(path, nlen + 1, "/dev/%ld",
+                                              node);
+                               devp[0] = '/';
+                               error = -ENOENT;
+                               if (path_init (path,
+                                              LOOKUP_FOLLOW|LOOKUP_POSITIVE,
+                                              &tnd))
+                                       error = path_walk(path, &tnd);
+                               if (error >= 0 &&
+                                   tnd.dentry->d_inode == inode) {
+                                       len = tmp + PAGE_SIZE - 1 - path;
+                                       if (len > buflen)
+                                               len = buflen;
+                                       copy_to_user(buffer, path, len);
+                               }
+                       }
+               }
+       }
+       buflen = len;
+ #else
        if (len < buflen)
                buflen = len;
        copy_to_user(buffer, path, buflen);
+ #endif
+ 
        free_page((unsigned long)tmp);
        return buflen;




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
ide.eclipse.wtp...    bug-tracking.ro...    xfree86.cvs/200...    lisp.wxcl.devel...    file-systems.ar...    kde.devel.kwrit...    jakarta.jetspee...    qnx.openqnx.dev...    drivers.openib/...    ports.xbox.deve...    gis.gdal.devel/...    netbsd.ports.ma...    ubuntu.marketin...    systemtap/2005-...    web.omniweb/200...    mail.qmail.ldap...    hardware.soekri...    os.netbsd.devel...    audio.madman.ge...    tv.freeguide-tv...    cluster.openmos...    education.ezpro...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation