plan 9 kernel history: overview | file list | diff list

1991/1112/power/devrtc.c (diff list | history)

1991/1105/sys/src/9/power/devrtc.c:44,501991/1112/sys/src/9/power/devrtc.c:44,50 (short | long | prev | next)
1990/12041    
 
static Dirtab rtcdir[]={ 
1991/0924    
	"rtc",		{Qrtc, 0},	0,	0644, 
1991/10302    
	"nvram",	{Qnvram, 0},	0,	0644, 
1991/1112    
	"nvram",	{Qnvram, 0},	0,	0600, 
1990/1204    
}; 
1991/0924    
#define	NRTC	(sizeof(rtcdir)/sizeof(rtcdir[0])) 
1990/1204    
 
1991/1105/sys/src/9/power/devrtc.c:97,1081991/1112/sys/src/9/power/devrtc.c:97,102
1990/1204    
Chan* 
rtcopen(Chan *c, int omode) 
{ 
1991/10302    
	if(c->qid.path==Qrtc && (omode&(OWRITE|OTRUNC))) 
1991/1105    
	if(strcmp(u->p->user, "bootes") != 0)	/* BUG */ 
1991/10302    
		error(Eperm); 
	if(c->qid.path == Qnvram) 
1991/1105    
	if(strcmp(u->p->user, "bootes") != 0)	/* BUG */ 
1991/10302    
		error(Eperm); 
1991/0621    
	return devopen(c, omode, rtcdir, NRTC, devgen); 
1990/1204    
} 
 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)