Gary Winiger wrote: >> Solution 3: >> =========== >> Add a new key word, "class" in device_allocate(4) (key words were >> introduced in PSARC/2005/691, but are missing from the current man page >> -- see case directory) to the existing key words to distinguish a class >> of devices. Add a new key word, "xdpy" in device_allocate(4) to the >> existing key words to store an X Display name. Both new key words >> are generic and are not restricted to SunRay operation. SunRay is the >> first identified consumer. >> add_allocatable(1M) and remove_allocatable(1M) are used to update >> device_allocate(4). >> > > From the pre-review, I'm still having trouble with the efficacy > of class and xdpy. I believe I see where class can be used > in deallocate and list_devices to deallocate a "class" of devices > as a single unit and to display for human consumption a class of > devices to identify their status. However, "xdpy" seem to be > "write only". add_allocatable will update the field, however > I don't see how it is possible to use the field outside of > allocate, deallocate, list_devices. There seems to be no public > programming interface to retrieve or filter on its value. > If it is returned by list_devices, the output of list_devices > is Not-An-Interface. None of the library routines for > device_allocate(4) are scoped public. > > So why are both "class" and "xdpy" required? How should xdpy > be used? > The output of list devices is consumed by the CDE and JDS device allocation tools. This has been the design for over 10 years. The output is in the form of key=value lists, and is parseable.
The xdpy value is the display number corresponding to the specific X server associated with the logged in user. Each user, whether on the console or a Sun Ray appliance, has his own X server with a unique port number, starting at 6000. By convention, 0 corresponds to 6000. From a user's perspective the only devices of interest are those associated with his session (not all Sun Ray sessions). The user cannot run any of the allocate, deallocate or list_devices commands. Instead, the user interacts with the CDE or JDS GUI which, in turn, runs these commands. Both GUIs filter the output of list_devices by matching the xdpy value with its own $DISPLAY value. So the user cannot see or allocate devices associated with other sessions. The CLIs don't interpret the xdpy value. That's because the CLIs have no knowledge of X windows. > This seems different from "zone," which I can intuit being used > for internal bookkeeping in allocate/deallocate to identify the > labeled zone where the allocated device nodes reside. > It is not related to zone. Remember that in a given zone there could be a hundred Sun Ray users, each with their own xdpy value. --Glenn
