⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getprop.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#if !defined(lint) && !defined(BOOTBLOCK)static char sccsid[] = "@(#)getprop.c 1.1 92/07/30 SMI";#endif/* * Copyright (c) 1988-1990 Sun Microsystems, Inc. * * Support routine for the Open Boot Proms. * Look up a property by name, and fetch its value. * This version of getprop fetches an int-length property * into the space at *ip. It returns the length of the * requested property; the caller should test that the * return value == sizeof (int) for success. * A non-int-length property can be fetched by getlongprop(), q.v. */#include <sys/param.h>#include <mon/sunromvec.h>intgetprop(id, name, ip)	int id;	char *name;	int *ip;{	register int len;	register char *cp;	len = prom_getproplen(id, name);	if (len == sizeof (int) && ip != (int *)0)		(void)prom_getprop(id, name, (char *)ip);	return (len);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -