Sponsored Content
Full Discussion: Device Names on Android
Operating Systems Linux Android Device Names on Android Post 302866713 by Corona688 on Tuesday 22nd of October 2013 03:27:28 PM
Old 10-22-2013
You would not see it in /sys/block, block devices are disks. I used my hard drive as an off-the-cuff example of how to get the major/minor numbers. It might be found under /sys/class/tty/. It is full of virtual terminals which you can ignore, but will have serial ports as well.

Lots of devices these days include a little hard drive thing along with the device. It might have device drivers on it or promotional software. Or it might be something else entirely, when you can see the hardware the way Linux does some things just act strange.
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Device Files names and location

HI there. I am studying System administration right now and am stuck on a question that I have failed to find the answer for in my book. The question is: Do device files need to be in the /dev directory and to they need to follow a naming convention? My answer (so far) is that since the... (7 Replies)
Discussion started by: Carl1976
7 Replies

2. Android

Android Scripting Environment: Shell Scripting and Android

I just upgraded to Android 2.2 from 2.1. The GPS issue that was troublesome in 2.1 seems to have been fixed. Some of web browsing seems faster, but it could just be my connection is better today ;) Flash works in some browsers but not very good and it is too slow for Flash apps designed for... (0 Replies)
Discussion started by: Neo
0 Replies

3. Red Hat

Unable To Activate Ethernet Network Device in RHEL 5.5 - e100 device eth0 does not seem to be presen

Hi All, Could anyone please help to resolve the below problem. I installed RHEL5.5 in my desktop.But when i try to activate the ethernet connection then it gives me the error. I spent 2 days for the above and go through with several suggestion found by googling. But no luck. ... (0 Replies)
Discussion started by: Tanmoy
0 Replies

4. Android

Running only the Linux kernel of an Android device

I am looking for a way to run on top of the Linux kernel of an Android device. I want to use the existing configured Linux beneath Android rather than put a new Linux distribution onto a device. The article "The Android boot process from power on" (sorry, forum won't let me paste the link)... (0 Replies)
Discussion started by: raoulney
0 Replies

5. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

6. UNIX for Beginners Questions & Answers

Android Device ID Changer shell script

this is worked "ANDROID NOUGAT" how can i use it for "ANDROID OREO" -plz help me... ------------------------------------------- echo " Ã-~-DEVICE ID CHANGINGÃ-~-" sleep 2 echo " " COUNT=1 while do ; echo "settings put secure android_id " | tr -d '\n' > X1... (4 Replies)
Discussion started by: f4is4l
4 Replies
ddi_create_minor_node(9F)				   Kernel Functions for Drivers 				 ddi_create_minor_node(9F)

NAME
ddi_create_minor_node - Create a minor node for this device SYNOPSIS
#include <sys/stat.h> #include <sys/sunddi.h> int ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type, minor_t minor_num, char *node_type, int flag); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
dip A pointer to the device's dev_info structure. name The name of this particular minor device. spec_type S_IFCHR or S_IFBLK for character or block minor devices respectively. minor_num The minor number for this particular minor device. node_type Any string literal that uniquely identifies the type of node. The following predefined node types are provided with this release: DDI_NT_SERIAL For serial ports DDI_NT_SERIAL_MB For on board serial ports DDI_NT_SERIAL_DO For dial out ports DDI_NT_SERIAL_MB_DO For on board dial out ports DDI_NT_BLOCK For hard disks DDI_NT_BLOCK_CHAN For hard disks with channel or target numbers DDI_NT_CD For CDROM drives DDI_NT_CD_CHAN For CDROM drives with channel or target numbers DDI_NT_FD For floppy disks DDI_NT_TAPE For tape drives DDI_NT_NET For DLPI style 1 or style 2 network devices DDI_NT_DISPLAY For display devices DDI_PSEUDO For pseudo devices flag If the device is a clone device then this flag is set to CLONE_DEV else it is set to 0. DESCRIPTION
ddi_create_minor_node() provides the necessary information to enable the system to create the /dev and /devices hierarchies. The name is used to create the minor name of the block or character special file under the /devices hierarchy. At-sign (@), slash (/), and space are not allowed. The spec_type specifies whether this is a block or character device. The minor_num is the minor number for the device. The node_type is used to create the names in the /dev hierarchy that refers to the names in the /devices hierarchy. See disks(1M), ports(1M), tapes(1M), devlinks(1M). Finally flag determines if this is a clone device or not, and what device class the node belongs to. RETURN VALUES
ddi_create_minor_node() returns: DDI_SUCCESS Was able to allocate memory, create the minor data structure, and place it into the linked list of minor devices for this driver. DDI_FAILURE Minor node creation failed. CONTEXT
The ddi_create_minor_node() function can be called from user context. It is typically called from attach(9E) or ioctl(9E). EXAMPLES
Example 1: Create Data Structure Describing Minor Device with Minor Number of 0 The following example creates a data structure describing a minor device called foo which has a minor number of 0. It is of type DDI_NT_BLOCK (a block device) and it is not a clone device. ddi_create_minor_node(dip, "foo", S_IFBLK, 0, DDI_NT_BLOCK, 0); SEE ALSO
add_drv(1M), devlinks(1M), disks(1M), drvconfig(1M), ports(1M), tapes(1M), attach(9E), ddi_remove_minor_node(9F) Writing Device Drivers NOTES
If the driver is for a network device (node_type DDI_NT_NET), note that the driver name will undergo the driver name constraints identified in the NOTES section of dlpi(7P). Additionally, the minor name must match the driver name for a DLPI style 2 provider. If the driver is a DLPI style 1 provider, the minor name must also match the driver name with the exception that the ppa is appended to the minor name. Non-gld(7D)-based DLPI network streams drivers are encouraged to switch to gld(7D). Failing this, a driver that creates DLPI style-2 minor nodes must specify CLONE_DEV for its style-2 ddi_create_minor_node() nodes and use qassociate(9F). A driver that supports both style-1 and style-2 minor nodes should return DDI_FAILURE for DDI_INFO_DEVT2INSTANCE and DDI_INFO_DEVT2DEVINFO getinfo(9E) calls to style-2 minor nodes. (The correct association is already established by qassociate(9F)). A driver that only supports style-2 minor nodes can use ddi_no_info(9F) for its getinfo(9E) implementation. For drivers that do not follow these rules, the results of a modunload(1M) of the driver or a cfgadm(1M) remove of hardware controlled by the driver are undefined. WARNING
Drivers must remove references to GLOBAL_DEV, NODEBOUND_DEV, NODESPECIFIC_DEV, and ENUMERATED_DEV to compile under Solaris 10 and later versions. SunOS 5.10 14 Dec 2004 ddi_create_minor_node(9F)
All times are GMT -4. The time now is 04:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy