"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/sg_pt_freebsd.c" between
sg3_utils-1.47r908.tgz and sg3_utils-1.47r915.tar.xz

About: sg3_utils contains utilities that send SCSI commands to devices. Beta version.

sg_pt_freebsd.c  (sg3_utils-1.47r908.tgz):sg_pt_freebsd.c  (sg3_utils-1.47r915.tar.xz)
/* /*
* Copyright (c) 2005-2021 Douglas Gilbert. * Copyright (c) 2005-2021 Douglas Gilbert.
* All rights reserved. * All rights reserved.
* Use of this source code is governed by a BSD-style * Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file. * license that can be found in the BSD_LICENSE file.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
/* sg_pt_freebsd version 1.45 20210731 */ /* sg_pt_freebsd version 1.46 20210912 */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#include <limits.h> #include <limits.h>
#include <libgen.h> /* for basename */ #include <libgen.h> /* for basename */
skipping to change at line 318 skipping to change at line 318
break; break;
case PROTO_NVME: case PROTO_NVME:
fdc_p->is_nvme_dev = true; fdc_p->is_nvme_dev = true;
fdc_p->is_cam_nvme = true; fdc_p->is_cam_nvme = true;
fdc_p->nsid = cam_dev->target_lun & UINT32_MAX; fdc_p->nsid = cam_dev->target_lun & UINT32_MAX;
break; break;
case PROTO_ATA: case PROTO_ATA:
case PROTO_ATAPI: case PROTO_ATAPI:
case PROTO_SATAPM: case PROTO_SATAPM:
case PROTO_SEMB: /* SATA Enclosure Management bridge */ case PROTO_SEMB: /* SATA Enclosure Management bridge */
if (vb) if (vb) {
pr2ws("%s: ATA and derivative devices not supported\n", pr2ws("%s: ATA and derivative devices not supported\n",
__func__); __func__);
if (vb > 2)
pr2ws(" ... FreeBSD doesn't have a SAT in its kernel\n");
}
ret = -EINVAL; ret = -EINVAL;
break; break;
#if __FreeBSD_version > 1200058 #if __FreeBSD_version > 1200058
case PROTO_MMCSD: case PROTO_MMCSD:
if (vb) if (vb)
pr2ws("%s: MMC and SD devices not supported\n", pr2ws("%s: MMC and SD devices not supported\n",
__func__); __func__);
ret = -EINVAL; ret = -EINVAL;
break; break;
#endif #endif
skipping to change at line 579 skipping to change at line 582
{ {
struct sg_pt_freebsd_scsi * ptp; struct sg_pt_freebsd_scsi * ptp;
if (NULL == vp) { if (NULL == vp) {
pr2ws(">>>> %s: given NULL pointer\n", __func__); pr2ws(">>>> %s: given NULL pointer\n", __func__);
return; return;
} }
if ((ptp = &vp->impl)) { if ((ptp = &vp->impl)) {
if (ptp->ccb) if (ptp->ccb)
cam_freeccb(ptp->ccb); cam_freeccb(ptp->ccb);
free(ptp); free(vp);
} }
} }
void void
clear_scsi_pt_obj(struct sg_pt_base * vp) clear_scsi_pt_obj(struct sg_pt_base * vp)
{ {
struct sg_pt_freebsd_scsi * ptp; struct sg_pt_freebsd_scsi * ptp;
if (NULL == vp) { if (NULL == vp) {
pr2ws(">>>>> %s: NULL pointer given\n", __func__); pr2ws(">>>>> %s: NULL pointer given\n", __func__);
 End of changes. 4 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)