Sponsored Content
Top Forums Programming need help about get errno [ENXIO] for mmap Post 302568101 by jim mcnamara on Wednesday 26th of October 2011 08:17:57 AM
Old 10-26-2011
/bin/ls is a regular file, the ENXIO error usually arises on devices like tty's which are character sepcial files. Normally len should be the result of a stat() call, struct stat st_size for /bin/ls in this case, because you are reading a regular file.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

mmap

Hello. I'm writing some random access i/o software on Solaris 8 using mmap64 to memory map large files (my test file is ~25 GB). The abbreviated code fragment is: fd = open(cbuf,O_RDONLY|O_LARGEFILE); struct stat statbuf; fstat(fd,&statbuf); off_t len =... (0 Replies)
Discussion started by: gusm
0 Replies

2. HP-UX

mmap failed

We recently have been seeing the following type of error on our development server. Being somewhat new to HP-UX I was hoping to get some insight. Here is what I have found. I have been doing some research. /usr/lib/dld.sl: Call to mmap() failed - TEXT /u07/mdev/lib/libCLEND.sl... (2 Replies)
Discussion started by: scotbuff
2 Replies

3. UNIX for Advanced & Expert Users

mmap and select

I'm using select() to monitor multiple file descriptors (inet sockets) in application. But this application must also collaborate with other applications on the same host via shared memory (mmap'ed file) due to performance reasons. How can I become notification that mmaped memory is changed or... (1 Reply)
Discussion started by: Hitori
1 Replies

4. Solaris

mmap() on 64 bit m/c

Dear Experts, i have a problem related to mmap(), when i run my program on sun for 64 bit which is throwing SIGBUS when it encounters mmap() function, what is the reason how to resolve this one, because it is working for 32 bit. with regards, vidya. (2 Replies)
Discussion started by: vin_pll
2 Replies

5. UNIX for Dummies Questions & Answers

mmap()

how to use mmap() to map a file to memory space. Do you have any simple program???? Because I have to implement lot of concepts into it. (3 Replies)
Discussion started by: gokult
3 Replies

6. Programming

mmap()

how to use mmap() to map a file to memory space. Do you have any simple program???? Because I have to implement lot of concepts into it. (5 Replies)
Discussion started by: gokult
5 Replies

7. Homework & Coursework Questions

mmap

Descriptions: Develop a program that uses mmap() to map a file to memory space. Prepare such a file by yourself and do the follows. <LI class=MsoNormal>Display the content of the file after mapping; <LI class=MsoNormal>Output how many digits included in the file; <LI class=MsoNormal>Replace... (1 Reply)
Discussion started by: gokult
1 Replies

8. Programming

mmap

hai, How do we map 'n' number of files into memory by using mmap system call?? Thanks in advance...... (5 Replies)
Discussion started by: andrew.paul
5 Replies

9. UNIX for Advanced & Expert Users

Regarding MMAP, MLOCK etc..

Hi I want to lock or prevent a portion of memory which I allocated. So I tried MLOCK, MPROTECT and some like this. But all these functions works only on page border. Can I know why that so. Is that possible to protect a portion of memory which is in middle of the page. Example. int A; ... (1 Reply)
Discussion started by: jionnet
1 Replies

10. Emergency UNIX and Linux Support

mmap

I want to know whether this is possile or ever been tried out. I want to obtain a chuck of memory using mmap() I do it so : n = mmap(0, 8000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); And hold on to that memory, when a process requests for memory, some memory is... (2 Replies)
Discussion started by: xerox
2 Replies
di_child_node(3DEVINFO) 			       Device Information Library Functions				   di_child_node(3DEVINFO)

NAME
di_child_node, di_parent_node, di_sibling_node, di_drv_first_node, di_drv_next_node - libdevinfo node traversal functions SYNOPSIS
cc [ flag... ] file... -ldevinfo [ library... ] #include <libdevinfo.h> di_node_t di_child_node(di_node_t node); di_node_t di_parent_node(di_node_t node); di_node_t di_sibling_node(di_node_t node); di_node_t di_drv_first_node(const char *drv_name, di_node_t root); di_node_t di_drv_next_node(di_node_t node); PARAMETERS
drv_name The name of the driver of interest. node A handle to any node in the snapshot. root The handle of the root node for the snapshot returned by di_init(3DEVINFO). DESCRIPTION
The kernel device configuration data may be viewed in two ways, either as a tree of device configuration nodes or as a list of nodes associated with each driver. In the tree view, each node may contain references to its parent, the next sibling in a list of siblings, and the first child of a list of children. In the per-driver view, each node contains a reference to the next node associated with the same driver. Both views are captured in the snapshot, and the interfaces are provided for node access. The di_child_node() function obtains a handle to the first child of node. If no child node exists in the snapshot, DI_NODE_NIL is returned and errno is set to ENXIO or ENOTSUP. The di_parent_node() function obtains a handle to the parent node of node. If no parent node exists in the snapshot, DI_NODE_NIL is returned and errno is set to ENXIO or ENOTSUP. The di_sibling_node() function obtains a handle to the next sibling node of node. If no next sibling node exists in the snapshot, DI_NODE_NIL is returned and errno is set to ENXIO or ENOTSUP. The di_drv_first_node() function obtains a handle to the first node associated with the driver specified by drv_name. If there is no such driver, DI_NODE_NIL is returned with errno is set to EINVAL. If the driver exists but there is no node associated with this driver, DI_NODE_NIL is returned and errno is set to ENXIO or ENOTSUP. The di_drv_next_node() function returns a handle to the next node bound to the same driver. If no more nodes exist, DI_NODE_NIL is returned. RETURN VALUES
Upon successful completion, a handle is returned. Otherwise, DI_NODE_NIL is returned and errno is set to indicate the error. ERRORS
These functions will fail if: EINVAL The argument is invalid. ENXIO The requested node does not exist. ENOTSUP The node was not found in the snapshot, but it may exist in the kernel. This error may occur if the snapshot contains a partial device tree. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
di_init(3DEVINFO), libdevinfo(3LIB), attributes(5) Writing Device Drivers SunOS 5.10 1 Dec 1998 di_child_node(3DEVINFO)
All times are GMT -4. The time now is 07:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy