Page MenuHomeFreeBSD

D25949.diff
No OneTemporary

D25949.diff

Index: head/sys/cam/mmc/mmc_all.h
===================================================================
--- head/sys/cam/mmc/mmc_all.h
+++ head/sys/cam/mmc/mmc_all.h
@@ -68,7 +68,6 @@
#include <cam/mmc/mmc.h>
#include <dev/mmc/mmcreg.h>
-void mmc_print_ident(struct mmc_params *ident_data);
struct ccb_pathinq;
struct cam_sim;
void mmc_path_inq(struct ccb_pathinq *cpi, const char *hba,
Index: head/sys/cam/mmc/mmc_xpt.c
===================================================================
--- head/sys/cam/mmc/mmc_xpt.c
+++ head/sys/cam/mmc/mmc_xpt.c
@@ -411,13 +411,11 @@
}
/* This func is called per attached device :-( */
-void
-mmc_print_ident(struct mmc_params *ident_data)
+static void
+mmc_print_ident(struct mmc_params *ident_data, struct sbuf *sb)
{
- struct sbuf *sb;
bool space = false;
- sb = sbuf_new_auto();
sbuf_printf(sb, "Relative addr: %08x\n", ident_data->card_rca);
sbuf_printf(sb, "Card features: <");
if (ident_data->card_features & CARD_FEATURE_MMC) {
@@ -463,13 +461,20 @@
static void
mmc_proto_announce(struct cam_ed *device)
{
- mmc_print_ident(&device->mmc_ident_data);
+ struct sbuf sb;
+ char buffer[256];
+
+ sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN);
+ mmc_print_ident(&device->mmc_ident_data, &sb);
+ sbuf_finish(&sb);
+ sbuf_putbuf(&sb);
}
static void
mmc_proto_denounce(struct cam_ed *device)
{
- mmc_print_ident(&device->mmc_ident_data);
+
+ mmc_proto_announce(device);
}
static void

File Metadata

Mime Type
text/plain
Expires
Sat, Jun 13, 5:23 PM (4 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33922167
Default Alt Text
D25949.diff (1 KB)

Event Timeline