slotString = PR_smprintf("0x%08x=[slotFlags=%s askpw=%s timeout=%d rootFlags=%s]",slotID,flags,askpw,timeout,rootFlags); PORT_Free(flags); PORT_Free(rootFlags);
flagPair=pk11_formatPair("slotFlags",flags,'\''); rootFlagsPair=pk11_formatPair("rootFlags",rootFlags,'\''); if (flags) PR_smprintf_free(flags); if (rootFlags) PORT_Free(rootFlags); if (defaultFlags & PK11_OWN_PW_DEFAULTS) { slotString = PR_smprintf("0x%08x=[%s askpw=%s timeout=%d %s]",slotID,flagPair,askpw,timeout,rootFlagsPair); } else { slotString = PR_smprintf("0x%08x=[%s %s]",slotID,flagPair,rootFlagsPair); } pk11_freePair(flags); pk11_freePair(rootFlags);
pk11_mkSlotString(unsigned long slotID, unsigned long defaultFlags,		  unsigned long timeout, unsigned char askpw_in,		  unsigned char hasRootCerts, unsigned char hasRootTrust) {    char *askpw,*flags,*rootFlags,*slotString;	    switch (askpw_in) {    case 0xff:	askpw = "every";	break;    case 1:	askpw = "timeout";	break;    default:	askpw = "any";	break;    }    flags = pk11_makeSlotFlags(defaultFlags);    rootFlags = pk11_makeRootFlags(hasRootCerts,hasRootTrust);    slotString = PR_smprintf("0x%08x=[slotFlags=%s askpw=%s timeout=%d rootFlags=%s]",slotID,flags,askpw,timeout,rootFlags);    PORT_Free(flags);    PORT_Free(rootFlags);    return slotString;}