Lines Matching refs:ent
680 struct devtabent *ent; /* Ptr to dev table entry structure */
695 if (!(ent = malloc(sizeof (struct devtabent)))) {
703 ent->entryno = dtabrecnum++;
707 ent->comment = TRUE;
709 if (ent->attrstr = malloc(strlen(record)+1)) {
710 q = ent->attrstr;
717 free(ent);
718 ent = NULL;
725 ent->comment = FALSE;
726 ent->attrstr = NULL; /* For now */
731 if (ent->alias = malloc(strlen(p)+1)) {
732 q = ent->alias;
738 } else ent->alias = NULL;
742 if (ent->alias)
743 free(ent->alias);
746 if (ent->cdevice = malloc(strlen(p)+1)) {
747 q = ent->cdevice;
753 } else ent->cdevice = NULL;
757 if (ent->alias) free(ent->alias);
758 if (ent->cdevice) free(ent->cdevice);
761 if (ent->bdevice = malloc(strlen(p)+1)) {
762 q = ent->bdevice;
769 ent->bdevice = NULL;
773 if (ent->alias) free(ent->alias);
774 if (ent->cdevice) free(ent->cdevice);
775 if (ent->bdevice) free(ent->bdevice);
778 if (ent->pathname = malloc(strlen(p)+1)) {
779 q = ent->pathname;
786 ent->pathname = NULL;
796 ent->attrlist = attr;
804 ent->attrlist = NULL;
815 free(ent);
816 ent = NULL;
819 return (ent);
836 _freedevtabent(struct devtabent *ent)
845 if (!ent->comment) {
856 q = ent->attrlist;
867 if (ent->alias) free(ent->alias);
868 if (ent->cdevice) free(ent->cdevice);
869 if (ent->bdevice) free(ent->bdevice);
870 if (ent->pathname) free(ent->pathname);
874 if (ent->attrstr) free(ent->attrstr);
877 free(ent);