when i use ddi_prop_op to give WWN property of device , a coredump happens.
There maybe some problems exist in my code.My  code prototype comes from 
"socal.c". The corresording source code and my code is following:
1) code in socal.c
        /* Get out Node wwn and calculate port wwns */
        rval = ddi_prop_op(DDI_DEV_T_ANY, dip,
                PROP_LEN_AND_VAL_ALLOC, DDI_PROP_DONTPASS |
                DDI_PROP_CANSLEEP, "wwn", (caddr_t)&wwn, &i);

2) my code.  dip is the dev_info node of scsi disk in sdprobe(dev_info_t *dip) 
        rval = ddi_prop_op(DDI_DEV_T_ANY, dip,
                PROP_LEN_AND_VAL_ALLOC, DDI_PROP_DONTPASS |
                DDI_PROP_CANSLEEP, "node-wwn", (caddr_t)&wwn, &i);
 cmn_err(CE_NOTE, "The node-WWN is:  %s", (wwn == NULL)?"(null)":wwn);


Is my way getting node-wwn correctly??   if wrong, how to get the WWN, tell me 
please!

thanks all!
 
 
This message posted from opensolaris.org
_______________________________________________
storage-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/storage-discuss

Reply via email to