WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Revert c/s 19504 -- uses an obsolete sysf

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Revert c/s 19504 -- uses an obsolete sysfs interface.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2009 23:03:14 -0700
Delivery-date: Tue, 07 Apr 2009 23:09:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239047762 -3600
# Node ID ff9fdd6fce1e0a79df71dec0c1dbc4725c8fbe47
# Parent  ce8f37efc992bfa501ae660983f412e78d96d221
Revert c/s 19504 -- uses an obsolete sysfs interface.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/misc/device-path |   78 -------------------------------------------------
 Makefile               |    2 -
 tools/misc/Makefile    |    2 -
 3 files changed, 2 insertions(+), 80 deletions(-)

diff -r ce8f37efc992 -r ff9fdd6fce1e Makefile
--- a/Makefile  Mon Apr 06 14:26:29 2009 +0100
+++ b/Makefile  Mon Apr 06 20:56:02 2009 +0100
@@ -224,7 +224,7 @@ uninstall:
        rm -rf $(D)$(LIBDIR)/xen/
        rm -rf $(D)/usr/lib/xen/
        rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
-       rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm 
$(D)/usr/sbin/device-path
+       rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
        rm -rf $(D)/usr/share/doc/xen
        rm -rf $(D)/usr/share/xen
        rm -rf $(D)/usr/share/man/man1/xen*
diff -r ce8f37efc992 -r ff9fdd6fce1e tools/misc/Makefile
--- a/tools/misc/Makefile       Mon Apr 06 14:26:29 2009 +0100
+++ b/tools/misc/Makefile       Mon Apr 06 20:56:02 2009 +0100
@@ -22,7 +22,7 @@ INSTALL_BIN-$(CONFIG_X86) += xen-detect
 INSTALL_BIN-$(CONFIG_X86) += xen-detect
 INSTALL_BIN := $(INSTALL_BIN-y)
 
-INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview 
xenpm device-path
+INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview 
xenpm
 INSTALL_SBIN := $(INSTALL_SBIN-y)
 
 DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
diff -r ce8f37efc992 -r ff9fdd6fce1e tools/misc/device-path
--- a/tools/misc/device-path    Mon Apr 06 14:26:29 2009 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-#!/usr/bin/env python
-#  -*- mode: python; -*-
-#============================================================================
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of version 2.1 of the GNU Lesser General Public
-# License as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#============================================================================
-# Copyright (c) 2009, NEC Corporation.
-#============================================================================
-# This script converts SBDF into device path.
-#   'SBDF' format is "[SEG#:]BUS#:DEV#.FUNC#"
-#       ex) 0000:0a:1f.3
-#   Device path format is "HID[:UID]-DEV#.FUNC#[-DEV#.FUNC#[...]]"
-#       ex) PNP0A08:0-2.0-0.0
-#============================================================================
-
-import sys
-import os
-
-# add fallback path for non-native python path installs if needed
-sys.path.append('/usr/lib/python')
-sys.path.append('/usr/lib64/python')
-from xen.util.pci import *
-
-SYSFS_ACPI_DEVS_PATH = '/firmware/acpi/namespace/ACPI/_SB'
-
-def find_hid_uid(dom, b, d, f):
-    sb_path = find_sysfs_mnt() + SYSFS_ACPI_DEVS_PATH
-    obj_list = os.listdir(sb_path)
-    for obj in obj_list:
-        obj_path = sb_path + '/' + obj.strip() + '/'
-        if os.path.exists(obj_path + 'seg') and \
-            os.path.exists(obj_path + 'bbn'):
-            seg = open(obj_path + 'seg').read()
-            bbn = open(obj_path + 'bbn').read()
-            if int(seg) == dom and int(bbn) == b:
-                hid = open(obj_path + 'hid').read()
-                if os.path.exists(obj_path + 'uid') is False:
-                    path_str = hid.strip()
-                else:
-                    uid = open(obj_path + 'uid').read()
-                    path_str = hid.strip() + ':' + uid.strip()
-                return path_str
-    return None
-
-def make_device_path(dom, b, d, f):
-    dev = PciDevice(dom, b, d, f)
-    parent = dev.find_parent()
-    if parent is None:
-        path_str = find_hid_uid(dom, b, d, f)
-        path_str = path_str + '-' + hex(d).replace('0x', '') + '.' + \
-            hex(f).replace('0x', '')
-        return path_str
-    (pdom, pb, pd, pf) = parent
-    path_str = make_device_path(pdom, pb, pd, pf)
-    path_str = path_str + '-' + hex(d).replace('0x', '') + '.' + \
-        hex(f).replace('0x', '')
-    return path_str
-
-# main
-if len(sys.argv) <> 2:
-    print 'Usage: device-path SBDF\n'
-else:
-    path = os.environ['PATH']
-    os.environ['PATH'] = path + ':/sbin' + ':/user/sbin'
-    sbdf = sys.argv[1]
-    (dom, b, d, f) = parse_pci_name(sbdf)
-    path_str = make_device_path(dom, b, d, f)
-    print path_str

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Revert c/s 19504 -- uses an obsolete sysfs interface., Xen patchbot-unstable <=