Skip to content

fix: remove vendor condition from lintape - #642

Merged
rangelmx merged 2 commits into
LinearTapeFileSystem:release/v2.4.9.0from
vandelvan:fix/hp-cap-invalid-drivers
Sep 4, 2026
Merged

fix: remove vendor condition from lintape#642
rangelmx merged 2 commits into
LinearTapeFileSystem:release/v2.4.9.0from
vandelvan:fix/hp-cap-invalid-drivers

Conversation

@vandelvan

@vandelvan vandelvan commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary of changes

Removed invalid condition from lintape driver since vendor does not exist for lintape devices

Description

When making #634 I added the vendor condition for all available drivers but lintape and scsi_ibmtape do not have vendor attribute for compatible devices, ignored it since the checks worked and I did not validated it myself, this PR reverts that change for lintape and scsi_ibmtape only

lin_tape_ibmtape.c: In function 'lin_tape_ibmtape_remaining_capacity':
lin_tape_ibmtape.c:2272:22: error: 'struct lin_tape_ibmtape' has no member named 'vendor'
 2272 |         (priv->vendor == VENDOR_HP && IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x06))) {
   |           ^~
lin_tape_ibmtape.c: In function 'lin_tape_ibmtape_open':
lin_tape_ibmtape.c:1163:70: warning: '%s' directive output may be truncated writing up to 254 bytes into a region of size 33 [-Wformat-truncation=]
 1163 |     snprintf(priv->info.serial_number, TAPE_SERIAL_LEN_MAX + 1, "%s", priv->drive_serial);
   |                                   ^~
lin_tape_ibmtape.c:1163:9: note: 'snprintf' output between 1 and 255 bytes into a destination of size 33
 1163 |     snprintf(priv->info.serial_number, TAPE_SERIAL_LEN_MAX + 1, "%s", priv->drive_serial);
   |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:527: libtape_lin_tape_la-lin_tape_ibmtape.lo] Error 1
make[3]: Leaving directory 'ltfs/src/tape_drivers/linux/lin_tape'

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • [N/A] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have confirmed my fix is effective or that my feature works

@vandelvan vandelvan self-assigned this Sep 4, 2026

@Rolaxgar97 Rolaxgar97 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Rolaxgar97
Rolaxgar97 self-requested a review September 4, 2026 17:41

@rangelmx rangelmx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this fix!

@rangelmx
rangelmx merged commit 5e84c19 into LinearTapeFileSystem:release/v2.4.9.0 Sep 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants