OpenSolaris

Printable Version Enter a New Search
Bug ID 6791258
Synopsis libsmedia broken after fix for 6665026
State 10-Fix Delivered (Fix available in build)
Category:Subcategory library:smedia
Keywords rtiq_internal
Responsible Engineer Zachary Kissel
Reported Against snv_105
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_110
Fixed In snv_110
Release Fixed solaris_nevada(snv_110)
Related Bugs 6665026
Submit Date 7-January-2009
Last Update Date 3-June-2009
Description
[Test case from Juergen Kiel]

The fix for 6665026 in b102 has broken access to removable devices
through libsmedia.  Compile and run this program:

bash-3.2$ cat smedia.c
/*
 * gcc -o smedia smedia.c -lsmedia
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/smedia.h>

int
main(int argc, char *argv[], char *envp[])
{
	/* path for DVD drive is system dependent */
	char *devname = "/dev/removable-media/rdsk/c0t0d0s2";
	int fd;
	smedia_handle_t hdl;

	if (argv[1])
		devname = argv[1];

	fd = open(devname, O_RDONLY|O_NONBLOCK);
	if (fd < 0) {
		perror(devname);
		exit(1);
	}
	hdl = smedia_get_handle(fd);
	if (hdl == 0) {
		fprintf(stderr, "cannot get smedia handle for fd %d\n", fd);
		exit(1);
	}
	printf("OK\n");
	smedia_release_handle(hdl),

	exit(0);
}
bash-3.2$ gcc smedia.c -o smedia -lsmedia
bash-3.2$ ./smedia
cannot get smedia handle for fd 3
bash-3.2$

Do "pkgrm SUNWsmedia" and install the SUNWsmedia package delivered in b101 (attached).
No reboot required.

bash-3.2$ ./smedia
OK
bash-3.2$
Work Around
issue the following command and smserver will once again accept communication.

inetadm -m network/rpc/smserver proto="circuit_v"
Comments
N/A