Date: Mon, 15 Jun 2015 21:08:09 +0000 (UTC) From: Doug Ambrisko <ambrisko@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284429 - stable/10/sys/dev/mfi Message-ID: <201506152108.t5FL898C073825@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ambrisko Date: Mon Jun 15 21:08:08 2015 New Revision: 284429 URL: https://svnweb.freebsd.org/changeset/base/284429 Log: MFC r284180: Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists. Modified: stable/10/sys/dev/mfi/mfi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mfi/mfi.c ============================================================================== --- stable/10/sys/dev/mfi/mfi.c Mon Jun 15 20:47:26 2015 (r284428) +++ stable/10/sys/dev/mfi/mfi.c Mon Jun 15 21:08:08 2015 (r284429) @@ -375,6 +375,7 @@ mfi_attach(struct mfi_softc *sc) int error, commsz, framessz, sensesz; int frames, unit, max_fw_sge, max_fw_cmds; uint32_t tb_mem_size = 0; + struct cdev *dev_t; if (sc == NULL) return EINVAL; @@ -769,7 +770,8 @@ mfi_attach(struct mfi_softc *sc) sc->mfi_cdev = make_dev(&mfi_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0640, "mfi%d", unit); if (unit == 0) - make_dev_alias(sc->mfi_cdev, "megaraid_sas_ioctl_node"); + make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &dev_t, + sc->mfi_cdev, "%s", "megaraid_sas_ioctl_node"); if (sc->mfi_cdev != NULL) sc->mfi_cdev->si_drv1 = sc; SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->mfi_dev),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506152108.t5FL898C073825>