Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [BK PATCH] One strdup() to rule them all | Date | Fri, 12 Sep 2003 11:57:20 +1000 |
| |
In message <20030911162223.GB3989@wohnheim.fh-wedel.de> you write: > Andries, would you still object this function? > > char *strdup(const char *s, int flags) > { > char *rv = kmalloc(strlen(s)+1, flags); > if (rv) > strcpy(rv, s); > return rv; > }
No. We've been here. There are only around 50 users/potential users of such a thing in the kernel, and seven implementations, but Linus doesn't like it, so let's not waste more time on this please.
Rusty.
PS. kstrdrup is a better name since the args are different, a-la kmalloc. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |