---
plugins/gzip/gzip.c | 3 ++-
plugins/gzip/nbdkit-gzip-plugin.pod | 19 ++++++++++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/plugins/gzip/gzip.c b/plugins/gzip/gzip.c
index 09dd629..26d5e3c 100644
--- a/plugins/gzip/gzip.c
+++ b/plugins/gzip/gzip.c
@@ -1,5 +1,5 @@
/* nbdkit
- * Copyright (C) 2013 Red Hat Inc.
+ * Copyright (C) 2013-2018 Red Hat Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -217,6 +217,7 @@ static struct nbdkit_plugin plugin = {
.config = gzip_config,
.config_complete = gzip_config_complete,
.config_help = gzip_config_help,
+ .magic_config_key = "file",
.open = gzip_open,
.close = gzip_close,
.get_size = gzip_get_size,
diff --git a/plugins/gzip/nbdkit-gzip-plugin.pod b/plugins/gzip/nbdkit-gzip-plugin.pod
index a5f6b79..68dbf45 100644
--- a/plugins/gzip/nbdkit-gzip-plugin.pod
+++ b/plugins/gzip/nbdkit-gzip-plugin.pod
@@ -4,7 +4,7 @@ nbdkit-gzip-plugin - nbdkit gzip plugin
=head1 SYNOPSIS
- nbdkit gzip file=FILENAME.gz
+ nbdkit gzip FILENAME.gz
=head1 DESCRIPTION
@@ -18,6 +18,23 @@ files because seeking to a position in the gzip file involves
uncompressing lots of data. A more practical method to compress large
disk images is to use the L<xz(1)> format and L<nbdkit-xz-plugin(1)>.
+=head1 PARAMETERS
+
+=over 4
+
+=item B<file=>FILENAME.gz
+
+Serve the compressed file named C<FILENAME.gz>.
+
+This parameter is required.
+
+In nbdkit E<ge> 1.7, C<file=> may be omitted. To ensure that the
+filename does not end up being parsed accidentally as C<key=value>,
+prefix relative paths with C<./> (absolute paths do not need
+modification).
+
+=back
+
=head1 SEE ALSO
L<nbdkit-xz-plugin(1)>,
--
2.18.0