ia64/xen-unstable

changeset 7470:d8b35f72a587

Break proc paths out into separate include file, rather than inlining them.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Fri Oct 21 13:30:31 2005 +0100 (2005-10-21)
parents f31494465fb0
children e813ac9f7d23 b81723792274
files tools/xenstore/xenstored_domain.c tools/xenstore/xenstored_proc.h
line diff
     1.1 --- a/tools/xenstore/xenstored_domain.c	Fri Oct 21 12:07:14 2005 +0100
     1.2 +++ b/tools/xenstore/xenstored_domain.c	Fri Oct 21 13:30:31 2005 +0100
     1.3 @@ -33,6 +33,7 @@
     1.4  #include "talloc.h"
     1.5  #include "xenstored_core.h"
     1.6  #include "xenstored_domain.h"
     1.7 +#include "xenstored_proc.h"
     1.8  #include "xenstored_watch.h"
     1.9  #include "xenstored_test.h"
    1.10  
    1.11 @@ -449,7 +450,7 @@ static int dom0_init(void)
    1.12          char str[20]; 
    1.13          struct domain *dom0; 
    1.14          
    1.15 -        fd = open("/proc/xen/xsd_mfn", O_RDONLY); 
    1.16 +        fd = open(XENSTORED_PROC_MFN, O_RDONLY); 
    1.17          
    1.18          rc = read(fd, str, sizeof(str)); 
    1.19          str[rc] = '\0'; 
    1.20 @@ -457,7 +458,7 @@ static int dom0_init(void)
    1.21          
    1.22          close(fd); 
    1.23          
    1.24 -        fd = open("/proc/xen/xsd_port", O_RDONLY); 
    1.25 +        fd = open(XENSTORED_PROC_PORT, O_RDONLY); 
    1.26          
    1.27          rc = read(fd, str, sizeof(str)); 
    1.28          str[rc] = '\0'; 
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/xenstore/xenstored_proc.h	Fri Oct 21 13:30:31 2005 +0100
     2.3 @@ -0,0 +1,27 @@
     2.4 +/* 
     2.5 +    Copyright (C) 2005 XenSource Ltd
     2.6 +
     2.7 +    This program is free software; you can redistribute it and/or modify
     2.8 +    it under the terms of the GNU General Public License as published by
     2.9 +    the Free Software Foundation; either version 2 of the License, or
    2.10 +    (at your option) any later version.
    2.11 +
    2.12 +    This program is distributed in the hope that it will be useful,
    2.13 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.15 +    GNU General Public License for more details.
    2.16 +
    2.17 +    You should have received a copy of the GNU General Public License
    2.18 +    along with this program; if not, write to the Free Software
    2.19 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2.20 +
    2.21 +*/
    2.22 +
    2.23 +#ifndef _XENSTORED_PROC_H
    2.24 +#define _XENSTORED_PROC_H
    2.25 +
    2.26 +#define XENSTORED_PROC_MFN  "/proc/xen/xsd_mfn"
    2.27 +#define XENSTORED_PROC_PORT "/proc/xen/xsd_port"
    2.28 +
    2.29 +
    2.30 +#endif /* _XENSTORED_PROC_H */