Date: Mon, 9 Sep 2013 14:28:08 GMT From: zcore@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r257162 - soc2013/zcore/head/usr.sbin/bhyve Message-ID: <201309091428.r89ES80g053693@socsvn.freebsd.org>
index | next in thread | raw e-mail
Author: zcore Date: Mon Sep 9 14:28:08 2013 New Revision: 257162 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257162 Log: consider the device as ATAPI if the file's suffix is .iso Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Mon Sep 9 14:27:18 2013 (r257161) +++ soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Mon Sep 9 14:28:08 2013 (r257162) @@ -773,12 +773,22 @@ sc->ports = MAX_PORTS; for (i = 0; i < sc->ports; i++) { + int len, suflen; + char suf[] = ".iso"; char bident[sizeof("XX:X:X")]; struct blockif_ctxt *bctxt; fstr = strsep(&str, ","); if (fstr == NULL) break; + + /* we consider it as ATAPI if the file's suffix is .iso */ + len = strlen(fstr); + suflen = strlen(suf); + if (len > suflen && + !strncmp(fstr + len - suflen, suf, suflen)) + sc->port[i].atapi = 1; + /* * Attempt to open the backing image. Use the PCI * slot/func/ahci_port for the identifier stringhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309091428.r89ES80g053693>
